InsertKoinIO / koin

Koin - a pragmatic lightweight dependency injection framework for Kotlin & Kotlin Multiplatform
https://insert-koin.io
Apache License 2.0
9.07k stars 718 forks source link

dependencies conflicts #1650

Closed aplha98 closed 6 months ago

aplha98 commented 1 year ago

adding kmm/gradle io.insert-koin:koin-core + io.insert-koin:koin-compos

android/gradle io.insert-koin:koin-androidx-compose

java.lang.NoSuchMethodError: No direct method (Ljava/util/List;)V in class Lorg/koin/core/parameter/ParametersHolder; or its super classes (declaration of 'org.koin.core.parameter.ParametersHolder' appears in /data/app/com.benoholding.beno-AtWcI-M0k3L0SPiUyNDP0w==/base.apk!classes37.dex)

stack trace

FATAL EXCEPTION: main
                                                                                                    Process: com.benoholding.beno, PID: 21489
                                                                                                    java.lang.NoSuchMethodError: No direct method <init>(Ljava/util/List;)V in class Lorg/koin/core/parameter/ParametersHolder; or its super classes (declaration of 'org.koin.core.parameter.ParametersHolder' appears in /data/app/com.benoholding.beno-AtWcI-M0k3L0SPiUyNDP0w==/base.apk!classes37.dex)
                                                                                                        at org.koin.androidx.viewmodel.parameter.AndroidParametersHolder.<init>(AndroidParametersHolder.kt:13)
                                                                                                        at org.koin.androidx.viewmodel.factory.KoinViewModelFactory.create(KoinViewModelFactory.kt:24)
                                                                                                        at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.kt:187)
                                                                                                        at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.kt:153)
                                                                                                        at org.koin.androidx.viewmodel.GetViewModelKt.resolveViewModel(GetViewModel.kt:44)
                                                                                                        at org.koin.androidx.viewmodel.GetViewModelKt.resolveViewModel$default(GetViewModel.kt:29)
                                                                                                        at com.benoholding.beno.ui.features.MainActivity$special$$inlined$viewModel$default$1.invoke(ActivityVM.kt:80)
                                                                                                        at com.benoholding.beno.ui.features.MainActivity$special$$inlined$viewModel$default$1.invoke(ActivityVM.kt:46)
                                                                                                        at kotlin.UnsafeLazyImpl.getValue(Lazy.kt:81)
                                                                                                        at com.benoholding.beno.ui.features.MainActivity.getViewModel(MainActivity.kt:42)
                                                                                                        at com.benoholding.beno.ui.features.MainActivity.onCreate(MainActivity.kt:83)
                                                                                                        at android.app.Activity.performCreate(Activity.java:7980)
                                                                                                        at android.app.Activity.performCreate(Activity.java:7969)
                                                                                                        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1306)
                                                                                                        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3508)
                                                                                                        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3692)
                                                                                                        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
                                                                                                        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:140)
                                                                                                        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:100)
                                                                                                        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2235)
                                                                                                        at android.os.Handler.dispatchMessage(Handler.java:107)
                                                                                                        at android.os.Looper.loop(Looper.java:240)
                                                                                                        at android.app.ActivityThread.main(ActivityThread.java:7829)
                                                                                                        at java.lang.reflect.Method.invoke(Native Method)
                                                                                                        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:512)
                                                                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1027)
arnaudgiuliani commented 1 year ago

can you describe more what are you doing here? Do you use Android ViewModel in KMM shared module?

stale[bot] commented 7 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.