Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VerifyError: Verifier rejected class ... 'this' arg must be initialized

after third-party library upgrade I got a new crash on app launch:

java.lang.VerifyError: Verifier rejected class ly.img.android.e: void ly.img.android.e.<init>(java.lang.String, boolean) failed to verify: void ly.img.android.e.<init>(java.lang.String, boolean): [0x5C] 'this' arg must be initialized (declaration of 'ly.img.android.e' appears in base.apk!classes2.dex)
    at ly.img.android.b.<clinit>(Unknown Source:46)
    at ly.img.android.c.b(Unknown Source:0)
    at ly.img.android.PESDK.initSDK(Unknown Source:0)
    at ly.img.android.IMGLYAutoInit.onCreate(IMGLYAutoInit.java:41)
    at android.content.ContentProvider.attachInfo(ContentProvider.java:2092)
    at android.content.ContentProvider.attachInfo(ContentProvider.java:2066)
    at android.app.ActivityThread.installProvider(ActivityThread.java:6983)
    at android.app.ActivityThread.installContentProviders(ActivityThread.java:6528)

Yes, I know that there are a lot of similar problems there but I didn't find any solution or advise for me.

So, maybe someone there can provide hint or advise for me what's wrong there. Thanks

like image 324
Artem Avatar asked Oct 15 '22 03:10

Artem


1 Answers

Others were also facing this kind of issue, I think this can help you! ⛅

java.lang.VerifyError: Verifier rejected class ly.img.android.e: void ly.img.android.e.<init>(java.lang.String, boolean) failed to verify: void ly.img.android.e.<init>(java.lang.String, boolean): [0x5C] 'this' arg must be initialized (declaration of 'ly.img.android.e' appears in base.apk!classes2.dex)

But according to a GitHub thread they found a solution to this problem

https://github.com/CleverTap/clevertap-android-sdk/issues/15#issuecomment-454842450

The fix for this issue is available for AGP(Android Gradle Plugin) 3.3 (and 3.4) by setting an explicit dependency detailed below. After AGP 3.3.1 is released, remove the pinned version to allow you to pick up new D8/R8 releases again.

For AGP 3.3 amend your top-level build.gradle file with:

buildscript {
    repositories {
        maven {
            url "http://storage.googleapis.com/r8-releases/raw" // ADD THIS.
        }
    }
    dependencies {
        classpath 'com.android.tools:r8:1.3.52'  // ADD THIS. Must be before the Gradle Plugin for Android.
        classpath 'com.android.tools.build:gradle:3.3'
    }
}

For AGP 3.4 the r8 version should be 1.4.25

like image 99
Dupinder Singh Avatar answered Oct 29 '22 00:10

Dupinder Singh