Hi!
My current project mobile application use Gradle compile with AGP < 7.+.
I have to change the AGP version to 7.+
code before changed:
buildTypes.release {
...
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
when I build an app after migrating to AGP version 7.+, it crashes itself.
I have to change minifyEnabled and shrinkResources to false for an app to work normally.
I think the problem is obfuscation on my project and I follow this guide:
as I understand, I need to set minifyEnabled to false on AGP version 7.+ and implement the Proguard plug-in into my project.
-
If I want to obfuscate/minify my app. Should I set minifyEnabled to true or false?
(In my current project, if I set it to true app still crashes.) -
My gradle.properties have enableR8. Should I remove it?
# Disables R8 for Android Library modules only.
android.enableR8.libraries = true
# Disables R8 for all modules.
android.enableR8 = true
- Should I implement the Proguard plug-in into my project?
Shrink, obfuscate, and optimize your app | Android Developers