https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
j

José Carlos

10/27/2023, 10:57 AM
Hi, it's my first time with Kotlin and KMM. I was watching this video

https://www.youtube.com/watch?v=5_W5YKPShZ4

where he is using the Moko-MVVM. In the part that he's doing the UI and passing the viewModel to the UI class, he creates something like this
Copy code
val bookListViewModel = getViewModel(Unit, viewModelFactory { BookListViewModel() })
But for me i'm getting an 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' How can i fix this?
d

Debanshu Datta

10/29/2023, 10:18 PM
As far I could understand form the error this is due to the fact. There is a Java Version Mismatch at your system. Like you device have Java 11 but the project is having Java8 as configuration. I guess changing it will resolve the issue.
8 Views