koin
koin copied to clipboard
java.lang.NoSuchMethodError in version 4.0.0
Describe the bug After updating to version 4.0.0, by using the androidContext() function in Koin config it throws java.lang.NoSuchMethodError but without using this function it seems everything works properly.
To Reproduce Steps to reproduce the behavior:
- Add koin to a KMP project
- On Android application in Application class, inside startKoin call the androidContext() function and pass it the Application class
- By running the Android app it crashes with the mentioned exception.
Expected behavior Everything works like older versions without throwing NoSuchMethodError exception
Koin module and version:
koin-core:4.0.0
Snippet or Sample project to help reproduce
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
startKoin {
androidContext(this@MyApplication)
androidLogger()
modules(someModule)
}
}
}