如何保留所有的 api 接口(interface)和像回调一样使用的内部接口(interface)? 我在那里没找到http://proguard.sourceforge.net/manual/examples.html
最佳答案
URL 已经提供了答案。
A fast but sub-optimal alternative would be simply keeping all interfaces with "-keep interface *".
2016/3/25更新 保留Interface
中的所有方法。
-keep interface * {
<methods>;
}
2017/7/24更新 Java8的class文件可以存储metadata用于方法参数的反射,包括Interface
。 Proguard v5.3 可以使用以下 options 保留这些元数据:
-keepattributes MethodParameters
关于java - Proguard 保留所有 java 接口(interface),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36177352/