Android – in the signed APK, butterknife does not work
•
Android
I created an application with butter knife to implement onclick, ontouch and other functions. When I test it on Android device, it can work well; When I install debug APK on my Android device, it also works well. However, when I generate a signed APK and try to run it on my Android device, "onclick" and "ontouch" don't work properly. I generated APK using Android studio. Does anyone know the reason for this?
resolvent:
from http://jakewharton.github.io/butterknife/ Copy the rules used in the proguard-rules.pro file
-keep class butterknife.** { *; }
-dontwarn butterknife.internal.**
-keep class **$$ViewBinder { *; }
-keepclasseswithmembernames class * {
@butterknife.* <fields>;
}
-keepclasseswithmembernames class * {
@butterknife.* <methods>;
}
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码