Hello! Trying to get Injekt going with a test project of mine, and running into trouble. It works great on Lollipop+, but on Android 4.x I'm running into trouble.
The error I'm seeing:
java.lang.RuntimeException: Unable to instantiate application com.brianegan.bansa.counter.Application: uy.kohesive.injekt.api.InjektionException: No registered instance or factory for type com.brianegan.bansa.Store<com.brianegan.bansa.counter.ApplicationState, com.brianegan.bansa.Action>
at android.app.LoadedApk.makeApplication(LoadedApk.java:526)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4390)
at android.app.ActivityThread.access$1500(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1260)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5105)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:608)
at dalvik.system.NativeStart.main(Native Method)
Caused by: uy.kohesive.injekt.api.InjektionException: No registered instance or factory for type com.brianegan.bansa.Store<com.brianegan.bansa.counter.ApplicationState, com.brianegan.bansa.Action>
at uy.kohesive.injekt.registry.default.DefaultRegistrar.getInstance(DefaultRegistrar.kt:99)
at uy.kohesive.injekt.api.InjektScope.getInstance(Scope.kt)
at com.brianegan.bansa.counter.Application.<init>(Application.kt:30)
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1208)
at android.app.Instrumentation.newApplication(Instrumentation.java:990)
at android.app.Instrumentation.newApplication(Instrumentation.java:975)
at android.app.LoadedApk.makeApplication(LoadedApk.java:521)
... 11 more
My code can be found here:
https://github.com/brianegan/bansa/blob/master/examples/counter/src/main/kotlin/com/brianegan/bansa/counter/Application.kt
I also tried Injekting a module in onCreate instead of using a companion object, with no luck. Feeling like a bit of a n00b here though, trying to figure out what I'm doing wrong! Any advice would be much appreciated :)
Hello! Trying to get Injekt going with a test project of mine, and running into trouble. It works great on Lollipop+, but on Android 4.x I'm running into trouble.
The error I'm seeing:
My code can be found here:
https://github.com/brianegan/bansa/blob/master/examples/counter/src/main/kotlin/com/brianegan/bansa/counter/Application.kt
I also tried Injekting a module in
onCreateinstead of using a companion object, with no luck. Feeling like a bit of a n00b here though, trying to figure out what I'm doing wrong! Any advice would be much appreciated :)