Hi :smile: I have a multiplatform project targetin...
# multiplatform
y
Hi 😄 I have a multiplatform project targeting Desktop and Android. I would like to use the library for navigation voyager, but unfortunately, I’m getting this error.
Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option
Any suggestion how to solve it ?
b
Bump your jvm to 11 as the error states.
This happens, because library author compiled it against JDK11, but looks like you're using JDK8
1
d
🤔 I've just started getting this on my project as well, but I'm specifying Java 11 for all
KotlinCompile
and all Android configuration blocks.
@ynsok Did you get your issue resolved?
...just fixed mine; I was missing the multiplatform form of Kotlin-level
jvmTarget
setting in one of my
android
plugin configuration blocks e.g:
Copy code
android {
    ...
    compilations.all {
        kotlinOptions {
            jvmTarget = "11"
        }
    }
}
1
y
in KMP project I need add this in shared module:
Copy code
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
    kotlinOptions {
        jvmTarget = "11"
    }
}
👍 1