我使用idea13的ProGuard:警告:butterknife.internal.InjectViewProcessor:
ProGuard: Warning: butterknife.internal.InjectViewProcessor: can't find superclass or interface javax.annotation.processing.AbstractProcessor
我使用idea13的ProGuard:警告:butterknife.internal.InjectViewProcessor:
ProGuard: Warning: butterknife.internal.InjectViewProcessor: can't find superclass or interface javax.annotation.processing.AbstractProcessor
即使你没有张贴一个实际的问题,我假设你想要的警告产生了APK期间面对这个错误。
添加以下行到您的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>;
}
这些来自ButterKnife网站的说明很有用,谢谢。现在可以通过改造等方式面对其余的错误:P – voghDev
将这些添加到您的proguard-project.txt文件中#不要警告 –
链接(http://jakewharton.github.io/butterknife/index.html#似乎是坏的,主页(http://jakewharton.github.io/butterknife/)似乎没有提到Proguard;这些规则仍然是必要的吗? –
这个解决方案给做作品谢谢! – mithil1501
如果我们保持butterknife类,为什么我们需要-dontwarn线?为什么警告仍然出现? – Vas
请注意,“-keepnames class *”将意味着您的类名不会被混淆。 – aaronmarino