Android App crashing with the following issue : java.lang.VerifyError: Verifier rejected class com.clevertap.android.sdk.InAppFCManager


#1

Suddenly started getting this error on v3.3.3

java.lang.VerifyError: Verifier rejected class com.clevertap.android.sdk.InAppFCManager: int[] com.clevertap.android.sdk.InAppFCManager.getInAppCountsFromPersistentStore(java.lang.String) failed to verify: int[] com.clevertap.android.sdk.InAppFCManager.getInAppCountsFromPersistentStore(java.lang.String): [0x3B] register v2 has type Conflict but expected Integer (declaration of ‘com.clevertap.android.sdk.InAppFCManager’ appears in /data/app/com.myapp.staging-w9oMEq_bIf4_tZ0J65nkLg==/base.apk)
at com.clevertap.android.sdk.CleverTapAPI.(CleverTapAPI.java:182)
at com.clevertap.android.sdk.CleverTapAPI.instanceWithConfig(CleverTapAPI.java:456)
at com.clevertap.android.sdk.CleverTapAPI.getDefaultInstance(CleverTapAPI.java:435)
at com.myapp.app.MyApp.initCleverTap(MyApp.kt:94)
at com.myapp.app.MyApp.onCreate(MyApp.kt:74)

This is what I am doing in my Application class onCreate()

private fun initCleverTap() {
cleverTap = CleverTapAPI.getDefaultInstance(applicationContext)
cleverTap?.enableDeviceNetworkInfoReporting(true)
CleverTapAPI.setDebugLevel(CleverTapAPI.LogLevel.DEBUG)
}
Android Studio 3.3 RC2


#2

As per Google Issue Tracker, 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 the r8 version should be 1.4.25

I have tested this on my personal app integrated with CleverTap SDK and it works


#3

If you are using Kotlin also add this to your repositories -

maven { url "https://kotlin.bintray.com/kotlinx/" }

This is for kotlinx-metadata-jvm:0.0.3 required by r8:1.3.52


#4

I’m getting the same issue as well. For now, the fix for me is to stay on Gradle v3.2.1


#5

I have same issue like this. Fixed by this way, add this into your root build.gradle file. It’s work for me.

buildscript {
repositories {
    maven { url "http://jcenter.bintray.com"}
    maven { url "http://storage.googleapis.com/r8-releases/raw"}
    google()
}
dependencies {
    classpath ('com.android.tools:r8:1.3.52' ) { transitive false }
    classpath 'com.android.tools.build:gradle:3.3.0'
}

}

:point_right: { transitive false } its works.


#6

still getting
Could not find org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.0.3.
Searched in the following locations:


#7

I am using below sdk version, also i am not using kotlin but this works for me.

implementation 'com.clevertap.android:clevertap-android-sdk:3.4.0’

    buildscript {
repositories {
    maven { url "http://jcenter.bintray.com"}
    maven { url "http://storage.googleapis.com/r8-releases/raw"}
    google()
}
dependencies {
    classpath ('com.android.tools:r8:1.3.52' ) { transitive false }
    classpath 'com.android.tools.build:gradle:3.3.0'
}

}