a question on android proguard obfuscation.
For some reason, when generating apk using ant, I want proguard to shrink size (remove unused classes) but no name obfuscation. In proguard.cfg
, I added:
-dontobfuscate
all others in proguard.cfg
are either -dontwarn
or -keep class
. But after decompile the generated apk (dex2jar
), I found many names are still obfuscated. Why this happens?
Thanks
Since nobody was actually answering this, here is the link to the post that solves the issue: Using Proguard with Android without obfuscation
Basically, what you need to add below your -dontobfuscate
instruction is:
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*,!code/allocation/variable
Important thing here is: !code/allocation/variable
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With