Hossein Amini
11/15/2021, 8:21 AMkotlin.Error: Ktor native HttpClient requires kotlinx.coroutines version with native-mt suffix (like 1.3.9-native-mt). Consider checking the dependencies
I’m currently using this dependency in the commonMain
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0-native-mt
And there is no issue when I run the app on the iOS but when I run test units on the iOS I get the error I mentioned above.
How can I fix it?Tijl
11/15/2021, 8:26 AMorg.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0-native-mt!!
in your declaration, likely something else specifies org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0
somewhere which gradle resolves as a higher version.Tijl
11/15/2021, 8:26 AM!!
forces the versionHossein Amini
11/15/2021, 8:40 AMkotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen
@TijlHossein Amini
11/15/2021, 9:05 AMorg.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0-native-mt!!
to the commonTest the problem fixed but when I build an instance of Ktor in my custom class it says kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen
but by creating an instance of Ktor directly in the test classes everything works correctly.hfhbd
11/15/2021, 9:08 AMgradle dependencies
to find the upgrading dependencyTijl
11/15/2021, 9:08 AM