koin icon indicating copy to clipboard operation
koin copied to clipboard

java.lang.NoSuchMethodError in version 4.0.0

Open hosseinaminii opened this issue 5 months ago • 1 comments

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:

  1. Add koin to a KMP project
  2. On Android application in Application class, inside startKoin call the androidContext() function and pass it the Application class
  3. 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)
            }
        }

    }

hosseinaminii avatar Sep 29 '24 10:09 hosseinaminii