Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facing some unknown issue some backend jvm internal error

I am facing some unknown issue looks like it is some internal compiler error: these are the error when building apk:

Error:org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: Couldn't transform method node: doResume (Ljava/lang/Object;Ljava/lang/Throwable;)Ljava/lang/Object;:
Error:org.jetbrains.org.objectweb.asm.tree.analysis.AnalyzerException: Error at instruction #375 L0: Incompatible stack heights
Error:org.jetbrains.org.objectweb.asm.tree.analysis.AnalyzerException: Incompatible stack heights

Any help would be appreciated.

like image 272
Suraj Vaishnav Avatar asked Apr 13 '18 13:04

Suraj Vaishnav


1 Answers

Error message: "e: org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: wrong bytecode generated"

In my case, I used runBlocking{} in one of MainViewModel.kt's methods.

The app was compiling successfully with runBlocking{} (which I shouldn't use anyway)) until I changed the name of a parameter in that method.

I replaced runBlocking{} with viewModelScope.launch {} in order to get ride of this error message.

like image 133
Eric Cen Avatar answered Oct 22 '22 13:10

Eric Cen