'ViewModelProviders' is deprecated from androidx.lifecycle:lifecycle-*:2.2.0-alpha03 https://developer.android.com/jetpack/androidx/releases/lifecycle#2.2.0-alpha03 Here is solution for Kotlin 'ViewModelProviders' is deprecated. After upgrading lifecycle-extensions:2.1.0 to 2.2.0-alpha05 But what is Java version of that? ViewModelProvider(this).get(MyViewModel.class) not work for Java.
'ViewModelProviders' is deprecated. Java solution?
2.2k Views Asked by A.M. At
3
Generic Example (up to android.arch.lifecycle:extensions:1.1.0). it is deprecated from 1.1.1,
Generic Example (for android.arch.lifecycle:extensions:1.1.1)
OR, Use ViewModelStore link