We are using proguard for obfuscating the android app. We are able to obfuscate some classnames using proguard. But it’s not obfuscating certain class names like
- MainActivity
2.MainApplication
3.MemoryCheck
4.NotificationHandler etc…
What could be the reason for this?
Hi @Rahul_Kojrekar ,
Technically it’s not possible to obfuscate all names. Typically, names of classes, fields, and methods accessed through reflection (e.g. with serialization) cannot be obfuscated as that would result in a crash such as ClassNotFoundException
, NoSuchMethodException
, or NoSuchFieldException
.
For this reason, it’s possible (and necessary) to set up -keep
rules to instruct ProGuard which of the classes or class members should not be obfuscated. You can use the ProGuard Playground to visualize the effect your configuration has on your code.
Best regards,
Jonas
1 Like