Atul Gupta
09/14/2024, 2:12 PMkoinViewModel<AccountsVM>()
but getting below error at every usages
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.
It seems that koinViewModel
is built using Java 11 while I am targeting my android setup to 1.8 as below
kotlin {
androidTarget {
@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
}
}
}
android {
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
Is there something that I am missing? Or is koin-compose-viewmodel is not meant to use with jvm 1.8?arnaud.giuliani
09/16/2024, 1:42 PMAtul Gupta
09/16/2024, 1:43 PMkoin-bom = "4.0.0-RC2"
arnaud.giuliani
09/16/2024, 1:44 PMAtul Gupta
09/16/2024, 1:45 PMcompileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
arnaud.giuliani
09/16/2024, 1:45 PMAtul Gupta
09/16/2024, 1:46 PMcompose needs java 11 I think
is there any doc for this? I think I am getting it wrongarnaud.giuliani
09/16/2024, 1:46 PMAtul Gupta
09/16/2024, 1:47 PMVERSION_1_8
o/w common code which is compiled with later version of Java will not be able to run on Androidarnaud.giuliani
09/16/2024, 1:47 PMarnaud.giuliani
09/16/2024, 1:54 PMarnaud.giuliani
09/16/2024, 1:54 PMAtul Gupta
09/16/2024, 1:56 PMVERSION_1_8
o/w I think it fallbacks to you installed jdk version which is running the Gradle(or do you have some other way to set it?)arnaud.giuliani
09/16/2024, 1:56 PMarnaud.giuliani
09/16/2024, 1:57 PMAtul Gupta
09/16/2024, 1:57 PMarnaud.giuliani
09/17/2024, 10:44 AMAtul Gupta
09/17/2024, 11:53 AMarnaud.giuliani
09/17/2024, 12:49 PM