Hello! I'm starting on a new job today and my firs...
# koin
c
Hello! I'm starting on a new job today and my first task is to update koin from koin 2 to koin3. Ive never used koin before. I get an error here on
get
(Not enough information to infer type variable T)
Copy code
private val myApi = get(MyApiService::class.java)
I'm also reading through the migration docs and it seems like I might need to use koin-core, but I do have it added already. Any pointers?
j
I think you could just use:
Copy code
private val myApi = get<MyApiService>()
or
Copy code
private val myApi : MyApiService = get()
c
option 1 doesn't work. option 2 did in some cases though. looks like i just have to tweak those values