Hi guys, I’m using ktor+kotlinx.serialization. Whe...
# ktor
g
Hi guys, I’m using ktor+kotlinx.serialization. When I’m trying to get typed response I get a runtime crash:
Exception in thread "main" java.lang.NoClassDefFoundError: kotlinx/serialization/ShorthandsKt
at io.ktor.client.features.json.serializer.KotlinxSerializerKt.buildSerializer(KotlinxSerializer.kt:91)
at io.ktor.client.features.json.serializer.KotlinxSerializerKt.access$buildSerializer(KotlinxSerializer.kt:1)
at io.ktor.client.features.json.serializer.KotlinxSerializer.write(KotlinxSerializer.kt:69)
at io.ktor.client.features.json.JsonFeature$Feature$install$1.invokeSuspend(JsonFeature.kt:101)
at io.ktor.client.features.json.JsonFeature$Feature$install$1.invoke(JsonFeature.kt)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:273)
Can you point me what’s wrong? ktor 1.3.1, serialization 0.20.0
s
Ktor 1.3.1 should use serialization 0.14.0 and Kotlin 1.3.61.
👍 1
g
Thanks, it helped. I didn’t know that switching to the latest version of kotlin and serializable plugin can break the build 😀
s
Only until we get a new version of ktor. 🤞 we get a new one soon.