Closed elsennov closed 6 years ago
Ah, found out the problem. So I need to add explicit casting on the bean declaration. Something like this:
bean("http_logging_interceptor") {
val httpLoggingInterceptor = HttpLoggingInterceptor()
httpLoggingInterceptor.level = if (get("log_enabled")) HttpLoggingInterceptor.Level.BODY else HttpLoggingInterceptor.Level.NONE
httpLoggingInterceptor as Interceptor
}
Hello,
yes the DSL is purely descriptive. If your binding against another type (e.g: interface), use the as
expression or bind
operator:
https://insert-koin.io/docs/1.0/reference/koin-dsl/#binding-additional-types
Hi, I got this error.
Here are my classes:
And here are my modules:
Could you help me why am I getting this error?