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

dagomni

11/16/2020, 12:47 PM
Copy code
kotlin.Error: Ktor native HttpClient requires kotlinx.coroutines version with `native-mt` suffix (like `1.3.9-native-mt`). Consider checking the dependencies.
Has anyone else experienced this? It happens on iOS with Ktor 1.4.1, 1.4.2; coroutines 1.3.9-native-mt, 1.3.9-native-mt-2
c

cy

11/16/2020, 12:48 PM
You definitely have coroutines without “-native-mt” because of something
d

dagomni

11/16/2020, 12:57 PM
I don't think I do Here are my dependencies
Copy code
implementation "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"

implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion"

implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$serializationVersion"

implementation ("io.ktor:ktor-client-core:$ktorVersion")
implementation ("io.ktor:ktor-client-serialization:$ktorVersion")
implementation ("io.ktor:ktor-client-json:$ktorVersion")
implementation ("io.ktor:ktor-client-logging:$ktorVersion")

implementation "org.koin:koin-core:$koinVersion"
-----------------------------
implementation "io.ktor:ktor-client-ios:$ktorVersion"
Copy code
kotlinVersion = '1.4.10'
ktorVersion = "1.4.2"
coroutinesVersion = "1.3.9-native-mt-2"
serializationVersion = "1.0.0"
koinVersion = "3.0.0-alpha-4"
j

John O'Reilly

11/16/2020, 1:12 PM
It could be picking up transitive dependency to non
native-mt
version
try with something like
Copy code
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.kotlinCoroutines}") {
    isForce = true
}
d

dagomni

11/16/2020, 1:28 PM
@John O'Reilly it does work, thanks!
👍 1
17 Views