Stack Overflow archive
2 score

Proguard Obfuscation doesnt work on activities?

score
2
question views
4.1K
license
CC BY-SA 3.0

During the build process, proguard checks the AndroidManifest and keeps all activity classes. This is needed for your app to run. You should not obfuscate classes which extend android.app.Activity.


See:

Why Proguard keeps Activity class in Android?

Why proguard processes AndroidManifest.xml


whats the difference between ... keepclassmembers and ... keepclasseswithmembers

According to the documentation:

-keepclassmembers

Specifies class members to be preserved, if their classes are preserved as well. For example, you may want to keep all serialization fields and methods of classes that implement the Serializable interface.

-keepclasseswithmembers

Specifies classes and class members to be preserved, on the condition that all of the specified class members are present. For example, you may want to keep all applications that have a main method, without having to list them explicitly.

See: http://proguard.sourceforge.net/manual/usage.html

Originally posted on Stack Overflow. Public user contributions are licensed under Creative Commons Attribution-ShareAlike.