Keep a method from obfuscate in android

十年热恋 提交于 2019-12-08 10:02:34

问题


I want to keep a method from obfuscating and rename.

package test.app.my;

class my {
    public  void done() {

    }
}

回答1:


During build, obfuscation is handled by the build step that invokes Proguard, so to keep a method you add to your Proguard configuration file:

-keep class test.app.my {
    void done();
}

The configuration syntax supports wildcards and is quite powerful - take a look at some examples from the Proguard manual.



来源:https://stackoverflow.com/questions/31505353/keep-a-method-from-obfuscate-in-android

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