Cannot Inline Bytecode Built with Jvm Target 1.8 into Bytecode That Is Being Built with Jvm Target 1.6

Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6

You can fix this issue as follows:

  • Open the IntelliJ preferences
  • Go to Build, Execution, Deployment > Compiler > Kotlin Compiler BUT Other Settings > Kotlin compiler if Android Studio > 3.4
  • Change the Target JVM version to 1.8
  • Click Apply

Why I still get Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6

Add kotlinOptions and set jvmTarget to 1.8 in your build.gradle file to resolve the problem

kotlinOptions {
jvmTarget = "1.8"
}

Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6

You can fix this issue as follows:

  • Open the IntelliJ preferences
  • Go to Build, Execution, Deployment > Compiler > Kotlin Compiler BUT Other Settings > Kotlin compiler if Android Studio > 3.4
  • Change the Target JVM version to 1.8
  • Click Apply

Importing coroutines-common causes error Cannot inline bytecode build with JVM target 1.8 into.... Even with explicitly specified jvmTarget

The dependency org.jetbrains.kotlinx:kotlinx-coroutines-common:1.1.1 is wrong.

Use org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.1.1 instead.



Related Topics



Leave a reply



Submit