1

Have Ktor setup and working fine in my project. When running androidTest ("instrumentation tests") I get a NoSuchMethodError for Json.nonstrict.parse()code running in the tests. This is code in the test apk, not in the app.

java.lang.NoSuchMethodError: No virtual method parse(Lkotlinx/serialization/DeserializationStrategy;Ljava/lang/String;)Ljava/lang/Object; in class Lkotlinx/serialization/json/Json; or its super classes (declaration of 'kotlinx.serialization.json.Json' appears in /data/app/com.myapp-xT3-gAo92lzVXQoXVSRCnw==/base.apk)

The Kotlinx.serialization dependencies are declared in the module and I have tried implementation and androidImplementation.

Patrick Jackson
  • 18,766
  • 22
  • 81
  • 141
  • I'm not sure if this is what you're looking for, but on the Kotlin repo there is an issue that revolves around this same error. Currently it is still unresolved. https://github.com/Kotlin/kotlinx.serialization/issues/576 – mmr118 Jun 08 '20 at 14:28

0 Answers0