question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Type resolution error

See original GitHub issue

Hello, I can’t run app with such Koin module config:

factory { MyUseCase1(get(), get("executor"), get("postExecutor")) as UseCase< Response, MyUseCase1.Params> }
factory { MyUseCase2(get(), get("executor"), get("postExecutor")) as UseCase<Response, MyUseCase2.Params> }

Got the following error:

FATAL EXCEPTION: main
    Process: com.my, PID: 7399
    java.lang.RuntimeException: Unable to create application com.my.App: org.koin.error.BeanOverrideException: Try to override definition Factory [class='com.my.domain.interactor.UseCase'] with Factory [class='com.my.domain.interactor.UseCase'], but override is not allowed. Use 'override' option in your definition or module.
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5677)
        at android.app.ActivityThread.-wrap2(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1637)
        at android.os.Handler.dispatchMessage(Handler.java:105)
        at android.os.Looper.loop(Looper.java:156)
        at android.app.ActivityThread.main(ActivityThread.java:6523)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)
     Caused by: org.koin.error.BeanOverrideException: Try to override definition Factory [class='com.my.domain.interactor.UseCase'] with Factory [class='com.my.domain.interactor.UseCase'], but override is not allowed. Use 'override' option in your definition or module.
        at org.koin.core.bean.BeanRegistry.declare(BeanRegistry.kt:49)
        at org.koin.core.Koin.registerDefinitions(Koin.kt:103)
        at org.koin.core.Koin.registerDefinitions$default(Koin.kt:91)
        at org.koin.core.Koin.build(Koin.kt:78)
        at org.koin.standalone.StandAloneContext.loadKoinModules(StandAloneContext.kt:66)
        at org.koin.standalone.StandAloneContext.startKoin(StandAloneContext.kt:147)
        at org.koin.android.ext.android.ComponentCallbacksExtKt.startKoin(ComponentCallbacksExt.kt:59)
        at org.koin.android.ext.android.ComponentCallbacksExtKt.startKoin$default(ComponentCallbacksExt.kt:55)
        at com.my.App.onCreate(App.kt:21)
        at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1028)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5658)
        at android.app.ActivityThread.-wrap2(ActivityThread.java) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1637) 
        at android.os.Handler.dispatchMessage(Handler.java:105) 
        at android.os.Looper.loop(Looper.java:156) 
        at android.app.ActivityThread.main(ActivityThread.java:6523) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832) 

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

Error Resolution Defined - Investopedia
Error resolution is a procedure allowing consumers to dispute bookkeeping errors or unauthorized transactions related to their bank accounts.
Read more >
How is type resolution done? - java - Stack Overflow
When a method is overloaded (like all your methods here), Java uses the method which matches the most closely with the declared type...
Read more >
PMD shows "Error during type resolution" while reported class ...
No "Error during type resolution" should be reported. Current Behavior. The class mentioned in the error message is part of runtimeClasspath so it...
Read more >
How to Correct Screen Resolution Error in Windows 10?
How to Correct Screen Resolution Error in Windows 10? My desktop computer allows me to run Windows 8.1.1 on an SDD and Windows...
Read more >
Documentation - Module Resolution - TypeScript
In this case, the error would be something like error TS2307: Cannot find module 'moduleA'. ... Module resolution kind is not specified, using...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found