Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KoinInitializer can't start Koin configuration #2043

Open
uiiang opened this issue Nov 1, 2024 · 1 comment
Open

KoinInitializer can't start Koin configuration #2043

uiiang opened this issue Nov 1, 2024 · 1 comment
Labels
question Usage question

Comments

@uiiang
Copy link

uiiang commented Nov 1, 2024

微信截图_20241101110636

koin-bom = "4.0.0"
koin-core = { module = "io.insert-koin:koin-core", version.ref = "koin-bom" }
koin-android = { module = "io.insert-koin:koin-android", version.ref = "koin-bom" }
koin-androidx-compose = { module = "io.insert-koin:koin-androidx-compose", version.ref = "koin-bom" }
koin-androidx-workmanager = { module = "io.insert-koin:koin-androidx-workmanager", version.ref = "koin-bom" }
koin-androidx-startup = { module = "io.insert-koin:koin-androidx-startup", version.ref = "koin-bom" }

java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: java.lang.IllegalStateException: KoinInitializer can't start Koin configuration. Please use KoinStartup.onKoinStartup() function to register your Koin application.
at android.app.ActivityThread.installProvider(ActivityThread.java:7633)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:7106)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6977)
at android.app.ActivityThread.access$1500(ActivityThread.java:258)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1983)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:236)
at android.app.ActivityThread.main(ActivityThread.java:8060)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)
Caused by: androidx.startup.StartupException: java.lang.IllegalStateException: KoinInitializer can't start Koin configuration. Please use KoinStartup.onKoinStartup() function to register your Koin application.

@arnaudgiuliani
Copy link
Member

you have added koin-androidx-startup, and you try normal startup. remove the koin-androidx-startup lib, or setup Koin with android startup.

Wait patch 4.0.1 - https://insert-koin.io/docs/reference/koin-android/start#start-koin-with-androidx-startup-401

@arnaudgiuliani arnaudgiuliani added the question Usage question label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Usage question
Projects
None yet
Development

No branches or pull requests

2 participants