-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Description
We are experiencing a Google Play Production-only rejection related to Kotlin
removeFirst() / removeLast() usage when building an Android release with
targetSdk 35 (Android 15).
Google Play reports that the app contains calls to Kotlin extension functions
removeFirst() / removeLast() that conflict with new Java methods introduced
in Android 15, which may cause crashes on Android 14 and below.
The issue only appears when:
- Promoting the app to Production in Google Play
- Running Google's production pre-review validation
It does not appear in:
- Internal testing
- Closed / Open testing tracks
- Local release builds
Environment
[✓] Flutter (Channel stable, 3.38.5, on macOS 15.6 24G84 darwin-arm64, locale es-CO)
[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0)
[✓] Xcode - develop for iOS and macOS (Xcode 26.0.1)
- Android Gradle Plugin: 8.11.1
- Gradle: 8.14
- Kotlin: 2.2.20
- targetSdkVersion: 35
- Google Play track: Production
Affected package
metamap_plugin_flutter: ^4.5.21
After isolating dependencies, removing this plugin makes the Google Play
validation pass successfully.
Google Play error message
Your app uses Kotlin extension functions removeFirst() and removeLast(), which
conflict with Java methods in Android 15 and may cause crashes on Android 14
and lower.
Expected behavior
The plugin should avoid generating bytecode that resolves to
removeFirst() / removeLast() calls, or explicitly replace them with
safe alternatives such as:
removeAt(0)removeAt(list.lastIndex)
Impact
This issue blocks production releases for apps targeting Android 15
and higher, even though builds succeed locally and in testing tracks.
Request
Please:
- Audit the Android/Kotlin code used by the plugin
- Remove or replace any usage of
removeFirst()/removeLast() - Publish a patched release compatible with Android 15 Google Play checks
We are happy to help validate a fix.
Thanks in advance.