Hi folks! I’m having a hard time setting up kotlin...
# multiplatform
c
Hi folks! I’m having a hard time setting up kotlin-mpp dependencies with ktor and kotlin-serialization. Is there a good example avaialable?
Android works fine but getting following error for iOS
Copy code
Task :SharedCode:compileKotlinIos FAILED
w: skipping /Users/chetan.sachdeva/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-serialization-runtime-iosx64/0.12.0/ef9382034100a3061405a45a9526a44b1c4b37b1/kotlinx-serialization-runtime.klib. The abi versions don't match. Expected '[17]', found '14'
w: The compiler versions don't match either. Expected '[]', found '1.3.50-release-11850'
e: Could not find "/Users/chetan.sachdeva/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-serialization-runtime-iosx64/0.12.0/ef9382034100a3061405a45a9526a44b1c4b37b1/kotlinx-serialization-runtime.klib" in [/Users/chetan.sachdeva/AndroidStudioProjects/OmHolisticJourney, /Users/chetan.sachdeva/.konan/klib, /Users/chetan.sachdeva/.konan/kotlin-native-macos-1.3.61/klib/common, /Users/chetan.sachdeva/.konan/kotlin-native-macos-1.3.61/klib/platform/ios_x64].
c
r
I have a sample with Kotlin/Native: https://github.com/rodolphocouto/swapi-cli
r
What versions of everything are you using? That error indicates a mismatch between library version and language version.
c
Thanks @christophsturm and @rodolpho.couto! @russhwolf I’m using following versions (same as kotlin-conf app):
Copy code
kotlin_version=1.3.70

# kotlin libraries
coroutines_version=1.3.1
ktor_version=1.3.0-beta-2
serialization_version=0.12.0

# android
gradle_android_version=3.5.0
r
Yeah all your library versions are too old for 1.3.7x. Use coroutines 1.3.5 or 1.3.6, ktor 1.3.2, and serialization 0.20.0.
c
Great! I’ll try that. Thanks 🙂
Upgrading everything including gradle build version worked! Thanks everyone! 🙏
👍 1