hi, I’m new to koin, this is my first attempt to set it up. but it does not work.
my dependencies are wery simple:
class PWApp: Application() {
private val appModule = module {
single<AuthRepository> { SecureAuthRepository(get()) }
}
override fun onCreate() {
super.onCreate()
Stetho.initializeWithDefaults(this)
startKoin(this, listOf(appModule))
}
}
but it can not resolve reference for
join()
. Android Studio does not suggest any imports so I looked up examples and copy/pasted imporr from there:
import org.koin.android.ext.android.inject
But this method does not suits my case:
Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public inline fun <reified T : Any> ComponentCallbacks.inject(name: String = ..., scope: Scope? = ..., noinline parameters: ParameterDefinition /* = () -> ParameterList */ = ...): Lazy<AuthRepository> defined in org.koin.android.ext.android
I have no idea what to try next. Could someone please help me with this ?