streetsofboston
04/16/2019, 5:04 PMjava.lang.RuntimeException: Unable to start activity ComponentInfo{com.wecenergygroup.wps.debug/com.wec.weenergies.screens.landing.LandingActivity}: org.kodein.di.Kodein$NotFoundException: 3 bindings found that match bind<Context>() with ?<LandingActivity>().? { ? }:
module Context {
bind<Context>() with singleton { Application }
}
module WeEnergiesApplication {
bind<WeEnergiesApplication>() with singleton { WeEnergiesApplication }
}
module androidModule {
bind<Application>() with provider { Application }
}
The first two are under our app’s control, the last one is from Kodein’s androidModule
.
What would be the ‘best’ way to solve this ambiguity? Using ‘sub-type’ bindings or is there a less verbose way?salomonbrys
04/17/2019, 10:50 PMstreetsofboston
04/17/2019, 11:00 PMinstance()
is being called.
Is there way to bind to a concrete type and not to a sub-type?salomonbrys
04/18/2019, 5:20 AMstreetsofboston
04/18/2019, 4:22 PM