Proguard保留接口方法变量名称 [英] Proguard keep interface method variable names
问题描述
我正在尝试防止proguard混淆接口方法变量名.我的proguard.pro具有以下配置,但方法变量仍显示为a,b等.
I'm trying to prevent proguard from obfuscating interface method variable names. My proguard.pro has the following configurations but still the method variables appear as a, b etc.
-保持公开课* { 上市 *; }
-keep public class * { public *; }
-keepclassmembers类* { 上市 *; }
-keepclassmembers class * { public *; }
-keepattributes异常,内部类,签名 -keepparameternames -keep公共接口com.test.listener.MyListener {*; }
-keepattributes Exceptions,InnerClasses,Signature -keepparameternames -keep public interface com.test.listener.MyListener { *; }
推荐答案
-keep interface com.yourpackage.**{*;}
是您所需要的.它将保留您所有接口的名称和方法.
-keep interface com.yourpackage.**{*;}
is what you need. It will keep all your interface's name and methods.
这篇关于Proguard保留接口方法变量名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!