Emirhan Emmez
03/05/2023, 1:04 PMjava.lang.NoSuchMethodError: No virtual method getModule()Ljava/lang/Module; in class Ljava/lang/Class; or its super classes (declaration of 'java.lang.Class' appears in /apex/com.android.art/javalib/core-oj.jar)
Here is my code:
@Module
@InstallIn(SingletonComponent::class)
object NetworkModule {
@Provides
@Singleton
fun createKtorClient(): HttpClient =
HttpClient(CIO).config {
defaultRequest {
url("<http://localhost:8080/>")
contentType(ContentType.Application.Json)
accept(ContentType.Application.Json)
}
install(Logging) {
level = LogLevel.ALL
}
install(ContentNegotiation) {
json()
}
}
}