want to change package name but need keep Class Name not change. any idea?
Yes, it will work. You can have a class named abc. abc. abc.
Does ProGuard obfuscate code? You can obfuscate Android code to provide security against reverse engineering. You can use the Android ProGuard tool to obfuscate, shrink, and optimize your code. Obfuscated code can be more difficult for other people to reverse engineer.
-keepclassmembernames. This is the most permissive keep directive; it lets ProGuard do almost all of its work. Unused classes are removed, the remaining classes are renamed, unused members of those classes are removed, but then the remaining members keep their original names.
ProGuard is a tool to help minify, obfuscate, and optimize your code. It is not only especially useful for reducing the overall size of your Android application as well as removing unused classes and methods that contribute towards the intrinsic 64k method limit of Android applications.
ProGuard doesn't have a standard option to rename packages yet keep their simple class names.
You could create a ProGuard mapping file manually, with lines like:
com.example.MyClass -> a.MyClass:
com.example.MyOtherClass -> a.MyOtherClass:
You can then use the option -applymapping mapping.txt
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