Christopher Mederos
06/08/2023, 2:54 AMfun provideKtorClient() = HttpClient(OkHttp) {
install(ContentNegotiation) {
json()
}
}
val ktorModule = module {
single { provideKtorClient() }
}
A simple test fails with the error -
@Test
fun checkKtorModule() {
ktorModule.verify()
}
org.koin.test.verify.MissingKoinDefinitionException: Missing type 'io.ktor.client.engine.HttpClientEngine' for class 'io.ktor.client.HttpClient' in definition '[Singleton:'io.ktor.client.HttpClient']'arnaud.giuliani
06/16/2023, 1:52 PMprovideKtorClient()
Christopher Mederos
06/19/2023, 5:14 AMextraTypes
More details in the SO -
https://stackoverflow.com/questions/76428380/using-koin-for-ktor-client-in-android-missing-type-io-ktor-client-engine-httpc