Open steve1rm opened 2 months ago
This problem is similar to what I described in #95. Unfortunately the checks don't play nice when combining annotated modules and manual DSL. Since you register the Android context in the DSL at runtime, a compile time check cannot verify it.
How to provide a context to and class constructor in koin annotations
I have the following class that needs an context for the sharedPreferences. However, when using koin annotations I am not sure how to provide this context.
In my module I have the following:
I thought I could use the
androidContext()
the same way we use the koin DSL, but I get the followingandroidContext() unresolved reference
In my application class I have the following:
The versions I am using: