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

divyanshunegi

06/09/2021, 7:56 AM
I am adding latest ktor version 1.6.0 and its not being recognised in my KMM project, 1.4.0 is working fine, what could be the issue, anyone else faced this issue ?
g

gildor

06/09/2021, 7:58 AM
maybe dependency resolution problem? What kind error do you see?
d

divyanshunegi

06/09/2021, 11:31 AM
@gildor
Copy code
Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option
I got this
I have tried adding this
Copy code
compileOptions {
        sourceCompatibility = JavaVersion.VERSION_1_8
        targetCompatibility = JavaVersion.VERSION_1_8
    }
in Android block
also in IDE the imports does not work
k

kevindmoore

06/09/2021, 3:23 PM
Could there also be a problem with serialization? Maybe you need that plugin too?
g

gildor

06/09/2021, 3:31 PM
Shouldn't it be something like kotlinOptions { jvmTarget = "1.8" }
Because those compileOptions as I remember are for java, not for koilin
d

divyanshunegi

06/11/2021, 11:39 AM
@kevindmoore I have installed serialization plugin, as soon I change my gradle versions to 1.4.0 for ktor everything works, and when move to 1.6.0 it wrecks the IDE, and thanks for the inputs, really appreciated 👍 @gildor I tried adding this compile option as well (I have a .kts gradle) so got some alternate to add this block, it broke the gradle as well. for now I am working with 1.4.0 maybe this weekend will do more research
g

gildor

06/12/2021, 1:52 AM
What exactly is broken when you added jvmTarget?
3 Views