Android version release warning message: This App Bundle contains Java/Kotlin code, which might be obfuscated

AndroidGoogle PlayReleaseObfuscation

Android Problem Overview


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?

Android Solutions


Solution 1 - Android

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)

Solution 2 - Android

Just changing minifyEnabled to true worked for me

Solution 3 - Android

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'
        }
    } 

Solution 4 - Android

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

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

Solution 5 - Android

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'
    }
}

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionar36elView Question on Stackoverflow
Solution 1 - AndroidSharif Rafid Ur RahmanView Answer on Stackoverflow
Solution 2 - AndroidRushabh WaghmareView Answer on Stackoverflow
Solution 3 - AndroidMuhammad HaidarView Answer on Stackoverflow
Solution 4 - AndroidRiya GuptaView Answer on Stackoverflow
Solution 5 - AndroidTal VakninView Answer on Stackoverflow