esdudnik
10/30/2018, 4:49 PMval moduleName: Module = module {
single {... }
single { ...}
factory { ...}
}
to this
val moduleName: Module = module(path = "ModuleName") {
single {... }
single { ...}
factory { ...}
}
And after this small change I receiving an error when launching the app.
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:503)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: org.koin.error.BeanInstanceCreationException: Can't create definition for 'Factory [name='HomeViewModel',class='com.devindi.wallpaper.home.HomeViewModel', binds~(android.arch.lifecycle.ViewModel)]' due to error :
Can't proceedResolution 'class com.devindi.wallpaper.model.map.MapAreaManager (Kotlin reflection is not available)' - Definition is not visible from last definition : Factory [name='HomeViewModel',class='com.devindi.wallpaper.home.HomeViewModel', binds~(android.arch.lifecycle.ViewModel)]
Does anybody know what is the problem when adding path to the module constructor? Or probably there is an easier way to release specific module, without adding module path.
Thanks.