61

I got this warning message:

This App Bundle contains Java/Kotlin code, which might be obfuscated. We recommend you upload a deobfuscation file to make your crashes and ANRs easier to analyze and debug

what does it mean? what is the shortest solution for this?

ar36el
  • 946
  • 1
  • 9
  • 14
  • 1
    your code could be obfuscated by proguard so any crash analysis systems could give unreadable logs and advises to create and upload a de-obfuscation file https://support.google.com/googleplay/android-developer/answer/9848633?hl=en – fireb86 Oct 20 '20 at 15:35
  • 1
    But I do already get good crash reports with accurate function names and line numbers. Can I just ignore this message then? – xjcl Jan 06 '21 at 02:11

6 Answers6

72

Seems like it's a warning message coming from the new play console, you can solve it just by setting your minimum api level to 29 or even better by uploading the retrace mapping file as described here. Enable minify :

 buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    } 

After building apk/app bundle you can find /app/build/outputs/mapping/release/mapping.txt file . New console will allow you to upload mapping.txt along with your apk or bundle. You can find this option from App bundles and APKs menus.(According to this)

  • 14
    Goto the app in play console > App bundle explorer > On the top right click artifact and select the latest version that you just uploaded > Then go to downloads tab > Scroll down to assets tab > Upload it to "ReTrace mapping file" via the upload button on the right. – Sharif Rafid Ur Rahman Sep 05 '20 at 02:19
  • 2
    In my case (using Mac OS) mapping.txt located in build/app/outputs/mapping/r8/release/mapping.txt – fajar ainul Oct 21 '20 at 06:59
  • 1
    I use flutter build apk – fajar ainul Oct 21 '20 at 11:04
  • @SharifRafidUrRahman when i upload .aab and after i upload mapping.txt i have error/warning "You need to upload a valid .apk file.", i deleted mapping.txt and no have any warnings! Answer Rushabh work well) but i cant understand how( – Fortran Dec 30 '20 at 15:06
  • @SharifRafidUrRahman should be included as the correct answer ty – Rip3rs Feb 16 '21 at 16:26
  • @Fortran clean build. Rebuild. Increase version number then generate signed apk/aab then upload again with newly generated mapping text. – Sharif Rafid Ur Rahman Feb 17 '21 at 02:59
  • Thanks. Mine work by only changing minifyEnabled to true – SWIK Mar 29 '21 at 08:40
20

Just changing minifyEnabled to true worked for me

8

You can solve this by just enabling minify in your build. gradle(app) file:

buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    } 
Simas Joneliunas
  • 2,890
  • 20
  • 28
  • 35
Muhammad Haidar
  • 1,541
  • 16
  • 17
5

Just enable minify in your build.gradle(app) file:

 buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    } 
Riya Gupta
  • 69
  • 3
4

proguard-android-optimize.txt sometimes is unsupported so using the following is safer (see this):

buildTypes {
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
Tal Vaknin
  • 71
  • 1
  • 3
-1

But, after enabling "Minify enabled: true", many features like firebase authentications were not working properly. Not only firebase, but also other dependencies are not work properly after enabling this. I have tried it. You can also once recheck it.