Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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
like image 364
user2978140 Avatar asked Nov 30 '19 04:11

user2978140


2 Answers

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

like image 68
mikail yusuf Avatar answered Oct 25 '22 13:10

mikail yusuf


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

like image 43
Elan Avatar answered Oct 25 '22 13:10

Elan