Android studio 3.4.2 R8 obfuscator does not obfuscate class names, but only java code inside

非 Y 不嫁゛ 提交于 2020-07-06 10:46:31

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!