10/07/2020, 1:23 PM
Hey folks, I am working on converting a use-case in our Android App from retrofit/okhttp to ktor but according to this issue I am apparently using the wrong versions: The error I am receiving:
Caused by: java.lang.NoSuchMethodError: No direct method <init>(Ljava/lang/String;Lkotlinx/serialization/internal/GeneratedSerializer;I)V in class Lkotlinx/serialization/internal/SerialClassDescImpl; or its super classes (declaration of 'kotlinx.serialization.internal.SerialClassDescImpl
The versions I am using:
kotlin = 1.3.72
org.jetbrains.kotlin.plugin.serialization = 1.3.72
io.ktor:ktor-client-okhttp = 1.3.1
io.ktor:ktor-client-serialization-jvm = 1.3.1
io.ktor:ktor-client-logging-jvm = 1.3.1
Which versions should I use for Kotlin
? Can't change that one for now...
I could work around it by adding serialization as explicit dependency and bumping it to 0.20, but I hope it's not the right thing to do 🙈
implementation ("io.ktor:ktor-client-serialization-jvm:1.3.1") {
        exclude group: 'org.jetbrains.kotlin', module: 'kotlinx-serialization-runtime'
    implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.20.0"