问题
When I upgraded to the latest Gradle
version, my class names are not being obfuscated anymore. The current studio version is 3.4.2
As the latest version uses R8
obfuscation instead of Proguard
, I have removed the previous configuration of proguard-rules.pro
as it does almost nothing at all.
I still use
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
and inside proguard-rules.pro
i left only this:
-allowaccessmodification
-repackageclasses
The result is somehow obfuscated java code inside classes, but preserved class names and when apply some reverse engineering all original class names are visible. Need some help with this R8 to make it work as desired. Thank you in advance!
来源:https://stackoverflow.com/questions/57369315/android-studio-3-4-2-r8-obfuscator-does-not-obfuscate-class-names-but-only-java