java.lang.VerifyError: Verifier rejected class. Code working fine in debug mode, but not throwing this error in release mode
Asked Answered
P

5

8

Please help on this error.Below is error logcat:

Caused by: java.lang.VerifyError: Verifier rejected class edu.mit.jwi.morph.SimpleStemmer: java.util.List edu.mit.jwi.morph.SimpleStemmer.getNounCollocationRoots(java.lang.String) failed to verify: java.util.List edu.mit.jwi.morph.SimpleStemmer.getNounCollocationRoots(java.lang.String): [0x50] register v6 has type Reference: java.lang.Object but expected Precise Reference: java.lang.String

     java.util.List edu.mit.jwi.morph.SimpleStemmer.getVerbCollocationRoots(java.lang.String) failed to verify: java.util.List edu.mit.jwi.morph.SimpleStemmer.getVerbCollocationRoots(java.lang.String): [0x60] register v7 has type Reference: java.lang.Object but expected Precise Reference: java.lang.String
Practical answered 30/11, 2019 at 4:15 Comment(1)
Please post some code and let us know what portion of your code leads to this error.Imprecise
A
6

Faced the same issue, I was using

implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9'

I degraded the corountine to

implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.6'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.6'

and it worked.

It seems version 1.3.9 has some bugs according to kotlin documentation

Apery answered 27/9, 2020 at 8:57 Comment(0)
O
3

If it happend to coroutines on Android, revert coroutines lib to 1.3.6 works for me. It seems that there is VerifyError bug in android coroutines lib version 1.3.7-1.3.8, and fixed after 1.4.0.

Details see below link: https://github.com/Kotlin/kotlinx.coroutines/issues/2049 https://github.com/Kotlin/kotlinx.coroutines/issues/2041

Overturn answered 28/7, 2020 at 12:13 Comment(0)
A
3

Downgrading dependencies did not work for me.

Remove @JvmStatic

If you create a suspend function be sure that you are not also using the @JvmStatic annotation for this method. Doing so will definitely throw this error.

Audun answered 20/1, 2021 at 0:46 Comment(0)
P
1

Resolved. This was an unnecessary issue thrown after the use of Proguard.

Added -dontwarn for that class in the Proguard rules. The release is working perfectly fine.

Practical answered 1/12, 2019 at 8:21 Comment(0)
C
0

I have added an API call inside the coroutineScope this way, the error was resolved.

import kotlinx.coroutines.coroutineScope

coroutineScope {
  //Your Api Call
}
Certain answered 18/7, 2024 at 9:33 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.