Anyone else do a bunch of updates today (latest alpha androidx everything, compose 1.0.1 or 1.1.0-alpha01 and kotlin 1.5.21) and hilt started breaking?
Been trying to diagnose this now for a few hours. Throwing in the towel for now and reverting. https://github.com/google/dagger/issues/2800
i
itnoles
08/05/2021, 3:29 AM
I give up on dagger over javax Injects unresolved.
i
Ian Lake
08/05/2021, 4:36 AM
So what does your
MyScreenViewModelFactory
actually override? It sounds like you got the nullability wrong on your
create
method
c
Colton Idle
08/05/2021, 4:58 AM
This is what I currently have. I will try to look up the docs if there's an example of this.
Copy code
class MyScreenViewModelFactory(private val client: Client?) : ViewModelProvider.Factory {
override fun <T : ViewModel?> create(modelClass: Class<T>): T {
return MyScreenViewModel(client) as T
}
}