I could use some help understanding why this modul...
# koin
c
I could use some help understanding why this module for a ktor client fails -
Copy code
fun provideKtorClient() = HttpClient(OkHttp) {
    install(ContentNegotiation) {
        json()
    }
}

val ktorModule = module {
    single { provideKtorClient() }
}
A simple test fails with the error -
Copy code
@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']'
a
here it depends what you have in
provideKtorClient()
c
Ultimately there were two separate issues - Starting the app in Android Studio required restarting the IDE - must have been a caching issue Running the sample test was resolved by using
extraTypes
More details in the SO - https://stackoverflow.com/questions/76428380/using-koin-for-ktor-client-in-android-missing-type-io-ktor-client-engine-httpc