https://kotlinlang.org logo
#koin
Title
# koin
c

cymessmer

03/24/2023, 3:43 AM
Good evening, I’m getting this error,
Caused by: org.koin.core.error.NoBeanDefFoundException: |- No definition found for class:'java.lang.String'. Check your definitions!
The library I’m working on is started by `Sdk.init(applicationContext, "A", "B", A.Enum, B.Enum)`within the init is
Copy code
fun init(context: Context, aString: String, bString: String, aEnum: AEnum, bEnum: BEnum) {
    startKoin {
        androidLogger(<http://Level.INFO|Level.INFO>)
        androidContext(context)
        modules(myModule)
    }
    inject<InitConfig>(InitConfig::class.java) {
        parametersOf {aString, bString, aEnum, bEnum}
    }
}
If anyone can provide some help or direction it would be greatly appreciated! Update: I had to create a wrapper around InitConfig, InitConfigProvider(initConfig) which I was able to create a singleOf. One other issues I ran into is I was trying to inject with assigning and using it. I found if that isn’t done that the definition is never created. I hope this helps anyone else who may run into this.
👍 1
5 Views