Play Console warns the bundle may be obfuscated and has no mapping file
This App Bundle contains Java/Kotlin code, which might be obfuscated.Short answer
This warning is about crash reports, not about your release being blocked. If R8 renames your classes and Play Console has no mapping file for that version, crashes and ANRs stay unreadable. A bundle built with Android Gradle plugin 4.1 or newer carries the file itself. Otherwise upload it for that version in the App bundle explorer.
Fix it fast
1Find out which cause you have
Find out which Android Gradle plugin version the app uses, because it decides whether the bundle brings its own mapping file.
grep -rn "com.android.application" --include=*.gradle --include=*.kts --include=*.toml .2Match what you see, then jump to its fix
What does the error look like?
This App Bundle contains Java/Kotlin code, which might be obfuscated.
Cause 1 of 3
You upload an APK, not an app bundle
1Check
Play Console takes the deobfuscation file from the bundle itself. For APKs it cannot, so you must supply it.
find . -path '*build/outputs*' -name '*.apk'2Fix
Prefer uploading a bundle. If you must ship an APK, upload the mapping file for that version: in Play Console go to Test and release, App bundle explorer, pick the artifact, open the Downloads tab and use the upload arrow under Assets.
./gradlew bundleRelease3Verify
The mapping file shows in the Assets list for that version, and later crashes in Android vitals show readable stack traces.
ls app/build/outputs/bundle/release/Confirmed by support.google.com
Cause 2 of 3
The plugin is older than Android Gradle plugin 4.1
1Check
Automatic pickup of the mapping file from a bundle needs plugin 4.1 or later.
grep -rn "com.android.tools.build:gradle\|com.android.application" .2Fix
Update the Android Gradle plugin, then rebuild the bundle. Until then, upload the mapping file by hand for each release.
./gradlew bundleRelease3Verify
Upload the new bundle; the warning should no longer appear for it.
./gradlew --versionConfirmed by support.google.com
Cause 3 of 3
The mapping file belongs to a different version
1Check
A mapping file works only for the version it was built with, and Play Console supports ReTrace-compatible files. Only crashes after a correct upload are deobfuscated.
# Compare the version code of the crash with the version code of the mapping file you uploaded2Fix
In the Assets list, use the delete icon next to the wrong file, then upload the mapping file produced by the build you released.
# App bundle explorer > Downloads tab > Assets: delete icon, then upload icon3Verify
Wait for a new crash on that version and open it under Android vitals, Crashes and ANRs; the Stack Traces section should show original names.
# Monitor and improve > Android vitals > Crashes and ANRs > open the crashConfirmed by support.google.com
How do I stop it coming back?
- Save the mapping file of every release build as a CI artifact next to the bundle.
- Ship bundles, not APKs, to Play Console.
- Keep the Android Gradle plugin current.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
- QistLockA NestJS and React SaaS driving an Android Device Owner agent that locks financed phones when payments lapse.
- Dispatch ProA real-time logistics platform: Flutter apps, Spring Boot services and a Kafka event pipeline on AWS.
- Nuclear Home VideoA video-streaming Android app built from scratch, engineered for smooth playback.
Related fixes
Mobile apps
Flutter Android build stops with Execution failed for task ':app:…'
Execution failed for task ':app:compileFlutterBuildRelease'.
The line only tells you which Gradle step broke; the task name in the quotes tells you why.
5 causes, each with a fixMobile apps
AGP 9 marks the android block as deprecated or fails on BaseExtension
java.lang.ClassCastException: class com.android.build.gradle.internal.dsl.ApplicationExtensionImpl$AgpDecorated_Decorated cannot be cast to class com.android.build.gradle.BaseExtension
AGP 9.0 uses only the new public DSL interfaces.
3 causes, each with a fixMobile apps
The editor cannot find R, so every R.string and R.id turns red
Unresolved reference: R
R is a class that the build generates from your res folder, in the package named by the module's namespace.
4 causes, each with a fixMobile apps
Android Studio says it could not identify the launch activity when you press Run
Run > Edit Configurations > Launch Options is set to Nothing or to a class that no longer exists
Android Studio launches the activity marked with a MAIN action and a LAUNCHER category in the merged manifest.
3 causes, each with a fixMobile apps
FirebaseInstanceIdService and FirebaseInstanceId.getToken() no longer work
Deprecation warning on FirebaseInstanceId.getInstance().getToken()
Move token handling into a class that extends FirebaseMessagingService and override onNewToken, which runs when a token is first created and whenever it changes.
2 causes, each with a fixMobile apps
Java and Kotlin compile to different JVM targets in an Android module
Inconsistent JVM-target compatibility detected for tasks 'compileDebugJavaWithJavac' (1.8) and 'kaptGenerateStubsDebugKotlin' (17)
Java and Kotlin tasks in the same module are compiling for different JVM targets, for example 1.8 and 17.
2 causes, each with a fix