Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

Play Console warns the bundle may be obfuscated and has no mapping file

ErrorThis 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.

  • Applies to Android Gradle Plugin 8.x and 9.x, R8, Flutter 3.35
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 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 .
  2. 2Match what you see, then jump to its fix

    1. 1You build and upload .apk filesYou upload an APK, not an app bundleFix
    2. 2The version found in the first step is below 4.1The plugin is older than Android Gradle plugin 4.1Fix
    3. 3Crashes in Android vitals are still obfuscated although a file is uploadedThe mapping file belongs to a different versionFix

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 bundleRelease

3Verify

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

Did this fix it?

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 bundleRelease

3Verify

Upload the new bundle; the warning should no longer appear for it.

./gradlew --version

Confirmed by support.google.com

Did this fix it?

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 uploaded

2Fix

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 icon

3Verify

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 crash

Confirmed by support.google.com

Did this fix it?

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:

Related fixes

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.