Guilherme Delgado
09/16/2022, 11:57 PMException in thread “main” java.lang.NoClassDefFoundError: java/net/http/HttpClient$VersionIt crashes when I try to provide
ktor.HttpClient
have no idea why 🤷♂️ (my DI setup is similar to other online samples, ex PeopleInSpace).
I even tried something simpler like:
actual fun platformModule() = module {
single<HttpClient> { HttpClient(Java.create()) }
}
object HelperTest : KoinComponent {
val httpClient = get<HttpClient>()
}
LaunchedEffect(Unit) {
DependencyInjection.initKoin()
println("${HelperTest.httpClient}") // BOOOM!
}
Thanks.Guilherme Delgado
09/17/2022, 10:51 PMmodules("<http://java.net|java.net>.http")