KamilH
02/09/2021, 4:36 PMjava.lang.NoClassDefFoundError: Failed resolution of: Lio/ktor/client/features/json/JsonFeature;
exception, even though I can see that library’s pom file contains all of the required dependencies and my consuming app is downloading those dependencies. Library is working well in the Kotlin project. Do I need to add some kind of a configuration to be able to use it from Java app?andylamax
02/09/2021, 4:36 PMKamilH
02/09/2021, 4:42 PMandylamax
02/09/2021, 4:48 PMio.ktor:ktor-client-core
is not enought. You need to specify a specific client for android. either io.ktor:ktor-client-android
or io.ktor:ktor-client-okhttp
e.t.c. Now, which one did you include in your gradle build script?KamilH
02/09/2021, 4:51 PMio.ktor:ktor-client-core
io.ktor:ktor-client-json
io.ktor:ktor-client-logging
io.ktor:ktor-client-serialization
io.ktor:ktor-client-tests
io.ktor:ktor-client-android
All of those dependencies are getting included in the pom file as wellandylamax
02/09/2021, 5:03 PMbuild.gradle(.kts)
configurationsKamilH
02/09/2021, 5:08 PMJoost Klitsie
02/09/2021, 5:13 PMandylamax
02/09/2021, 5:14 PMKamilH
02/09/2021, 5:15 PMpackagingOptions {
exclude("META-INF/ktor-http.kotlin_module")
exclude("META-INF/ktor-utils.kotlin_module")
exclude("META-INF/ktor-io.kotlin_module")
exclude("META-INF/ktor-http-cio.kotlin_module")
exclude("META-INF/ktor-client-core.kotlin_module")
}
in a consumer app, it didn’t solve a problem unfortunatelyandylamax
02/09/2021, 5:17 PMKamilH
02/09/2021, 5:19 PMBig Chungus
02/09/2021, 5:25 PMKamilH
02/09/2021, 6:29 PMJoost Klitsie
02/09/2021, 7:06 PMKamilH
02/09/2021, 7:24 PM