In proguard, what is the keyword to preserve packa

2019-05-07 09:55发布

问题:

You can say:

-keepclassmembers class sun.** {
    public protected *;
}

But I am not excluding package/default access methods :(

void myMethod {

}

回答1:

You can add another -keepclassmembers like that:

-keepclassmembers class com.mycompany.MyClass {
  !public !protected !private *;
}