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

tylerwilson

03/04/2020, 6:12 PM
Do we need an updated ktor to work with kotlin 1.3.70 and serialization 0.20.? I am getting the following error at run time:
Copy code
java.lang.NoSuchFieldError: No field Companion of type Lkotlinx/serialization/json/Json$Companion; in class Lkotlinx/serialization/json/Json; or its superclasses (declaration of 'kotlinx.serialization.json.Json' appears in /data/app/com.webappclouds.salonbiz-ZLc1BlPrwYueYBzBSLTUTg==/base.apk!classes3.dex)
👌 1
g

gregorbg

03/04/2020, 6:50 PM
+1, similar issues here...
r

ribesg

03/04/2020, 7:01 PM
Usually yes
t

tylerwilson

03/04/2020, 7:40 PM
I changed my code to remove the call out to the JsonFeature like so:
Copy code
private val client = HttpClient {
//        install(JsonFeature) {
//            serializer = KotlinxSerializer()
//        }
    }
and it got rid of the error.
6 Views