java.lang.VerifyError: Verifier rejected class on Lollipop when using release APK

前端 未结 10 2071
渐次进展
渐次进展 2020-12-05 06:22

I get this error when I install my release APK on a 5.x device. The error does not occur when I push the same code from Android Studio, or if I run it on a

10条回答
  •  甜味超标
    2020-12-05 06:57

    In my case, the cause is proguard. My app shutdown on sumsung note3 whick is android 5.0.
    I imported the android-async-http-1.4.9.jar, the proguard is:

    -dontwarn com.loopj.android.http.**
    -keep class com.loopj.android.http.**{*;}
    

    It is not enough. I added:

    -dontwarn cz.msebera.**
    -keep class cz.msebera.**{*;}
    

    the bug gone.

    so if you come into this bug, the deep-seated reason maybe not obvious, it is to be noted the proguard file.

提交回复
热议问题