【发布时间】:2015-10-01 11:02:26
【问题描述】:
我在使用idea13生成apk时遇到了这个错误
ProGuard: Warning: butterknife.internal.InjectViewProcessor: can't find superclass or interface javax.annotation.processing.AbstractProcessor
【问题讨论】:
标签: android
我在使用idea13生成apk时遇到了这个错误
ProGuard: Warning: butterknife.internal.InjectViewProcessor: can't find superclass or interface javax.annotation.processing.AbstractProcessor
【问题讨论】:
标签: android
即使您没有发布实际问题,我假设您希望该警告消失。
将以下行添加到您的 ProGuard 配置中:
-dontwarn butterknife.internal.**
-keep class **$$ViewInjector { *; }
-keepnames class * { @butterknife.InjectView *;}
【讨论】:
如果有人确实遇到了 Proguard 和 Butterknife 的问题,请使用http://jakewharton.github.io/butterknife/index.html#proguard提供的以下内容
-keep class butterknife.** { *; }
-dontwarn butterknife.internal.**
-keep class **$$ViewBinder { *; }
-keepclasseswithmembernames class * {
@butterknife.* <fields>;
}
-keepclasseswithmembernames class * {
@butterknife.* <methods>;
}
【讨论】: