icerockdev / moko-mvvm

Model-View-ViewModel architecture components for mobile (android & ios) Kotlin Multiplatform development
https://moko.icerock.dev/
Apache License 2.0
1.03k stars 95 forks source link

Compile Error : JVM target 11 into bytecode that is being built with JVM target 1.8 #266

Open logicgupta opened 9 months ago

logicgupta commented 9 months ago

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

Getting Above error in compiling below line of code

val viewModel = getViewModel(key = "HomeScreen", factory = viewModelFactory { NewsViewModel() })

logicgupta commented 9 months ago

@Alex009 PLEASE HAVE A LOOK

ernestkamara commented 8 months ago

I also ran into this issue when running my Compose Multiplatform Android app.

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

ernestkamara commented 8 months ago

Updating the target to 11 worked for me.

Screenshot 2024-03-03 at 20 59 48
Fifteen15Studios commented 7 months ago

This works when building for Android, but not when building for desktop. I tried changing the target everywhere I can, and still get this error when building for desktop.