Proguard setting to not remove unused method

雨燕双飞 提交于 2019-12-05 21:19:15
Eric Lafortune

Almost right. In java bytecode, the $ character separates the names of inner classes and their outer classes (to avoid ambiguities with package names). So, to keep just the method:

-keepclassmembers class blah.A$B {
  public void foo(java.lang.String);
}

I have a method 'myClickHandler' referenced only in an xml file.

This

-keepclassmembers class * extends android.app.Activity {
    public void myClickHandler(android.view.View );
}

stops it being removed in my application. Perhaps the extends .. will work for you

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!