I'm trying to inject a contentProvider with koin in my datasource class, but I can't find any approach to can do it.
This is my dataSource
class MyDataSource(private val application: Application, private val contentProvider: ContentResolver) : MyRepository {...}
and my module of koin
single<MyRepository> {
MyDataSource(get(), get())
}
And I'm getting this error:
Caused by: org.koin.core.error.NoBeanDefFoundException: No definition found for 'android.content.ContentResolver' has been found. Check your module definitions.
Tell Koin how to obtain a
ContentResolver
. Assuming you intialize your module in your customApplication
(sayMyApplication
) class: