ProGuard: Warning: butterknife.internal.InjectViewProcessor:

后端 未结 2 667
被撕碎了的回忆
被撕碎了的回忆 2021-02-08 00:57

I faced this error during generating apk using idea13

ProGuard:  Warning: butterknife.internal.InjectViewProcessor: can\'t find superclass or interface javax.ann         


        
相关标签:
2条回答
  • 2021-02-08 01:10

    Even though you didn't post an actual question, I'm assuming you want that warning gone.

    Add the following lines to your ProGuard configuration:

    -dontwarn butterknife.internal.**
    -keep class **$$ViewInjector { *; }
    -keepnames class * { @butterknife.InjectView *;}
    

    source

    0 讨论(0)
  • 2021-02-08 01:22

    If anyone does face an issue with Proguard and Butterknife, use the following given at 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>;
    }
    
    0 讨论(0)
提交回复
热议问题