在 android 中避免混淆方法

Keep a method from obfuscate in android

我想防止方法混淆和重命名。

package test.app.my;

class my {
    public  void done() {

    }
}

在构建期间,混淆由调用 Proguard 的构建步骤处理,因此要保留添加到 Proguard 配置文件的方法:

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

配置语法支持通配符,功能相当强大-看看examples from the Proguard manual.