ProGuard 没有完全混淆我的 Android 项目。当我在 decompileandroid.com 上反编译我的 apk 时,我发现它只是更改了局部临时变量的名称,没有其他任何更改。它不会更改类名、变量名、方法名或任何其他内容。
阅读手册后,所有可选命令似乎都在告诉它不要做某事,所以我认为它应该默认混淆所有内容。
我的 build.gradle 有以下...
buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } }
Neither of those two files exist is the project. The project is as it was converted from Eclipse by Android Studio.
我错过了什么。我是否需要创建这两个文件并在其中放置一些 proguard 参数 - 如果需要的话。我想要最大程度的混淆。 谢谢, 院长
最佳答案
Set minifyEnabled true in order to turn on code shrinking, and then shrinkResources true to turn on resource shrinking.
关于android - 如何使用 Android Studio 混淆 Proguard,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31225482/