Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
How to keep private Inner Class in ProGuard. I am already using($ for inner class) below code in my proguard.cfg but its not working.
-keep public class com.xxx.droid.activity.LoginActivity$JsInterface
这应该有效:
-keep public class com.xxx.droid.activity.LoginActivity$* { *; }
如果内部类是私有的,则不应public在模板中使用关键字,因为它不会匹配。编译器实际上会将类编译为包可见类(私有类在字节码级别不存在)。所以:
public
-keep class com.xxx.droid.activity.LoginActivity$JsInterface