You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I typically use latest versions of everything. After compose was updated to 1.1.0-alpha01 today I updated that and kotlin to 1.5.21 and then androidx had a bunch of releases today. After updating everything I get this when I try to run. I have tried cleaning and running too with the same error.
I have not gotten a minimal repro project or anything more than this, but I figured I'd file preemptively in case the hilt team already knows that there's some kind of issue with compose/kotlin/lifecycle deps.
Class 'MyScreenViewModelFactory' is not abstract and does not implement abstract member public abstract fun <T : ViewModel> create(modelClass: Class<T>): T defined in androidx.lifecycle.ViewModelProvider.Factory
The text was updated successfully, but these errors were encountered:
Source-breaking change: ViewModelProvider has been rewritten in Kotlin. ViewModelProvider.Factory.create method now longer allows nullable generic. (I9b9f6)
class MyScreenViewModelFactory(private val client: Client?) : ViewModelProvider.Factory {
override fun <T : ViewModel?> create(modelClass: Class<T>): T {
return MyScreenViewModel(client) as T
}
}
Just had to remove the ? after ViewModel, and then clean, and then rebuild.
I typically use latest versions of everything. After compose was updated to 1.1.0-alpha01 today I updated that and kotlin to 1.5.21 and then androidx had a bunch of releases today. After updating everything I get this when I try to run. I have tried cleaning and running too with the same error.
I have not gotten a minimal repro project or anything more than this, but I figured I'd file preemptively in case the hilt team already knows that there's some kind of issue with compose/kotlin/lifecycle deps.
The text was updated successfully, but these errors were encountered: