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
报错 Cannot create an instance of class com.wanandroid.module_home.HomeViewModel,好像
val type = (this.javaClass.genericSuperclass as ParameterizedType).actualTypeArguments
mViewModel = ViewModelProvider.AndroidViewModelFactory.getInstance(application)
.create(type[0] as Class)
拿不到class类,我想用ViewModel去实现双向绑定,在BaseActivity 或者BaseFragment 不太好拿到这个class
The text was updated successfully, but these errors were encountered:
报错 Cannot create an instance of class com.wanandroid.module_home.HomeViewModel,好像
val type = (this.javaClass.genericSuperclass as ParameterizedType).actualTypeArguments
mViewModel = ViewModelProvider.AndroidViewModelFactory.getInstance(application)
.create(type[0] as Class)
拿不到class类,我想用ViewModel去实现双向绑定,在BaseActivity 或者BaseFragment 不太好拿到这个class
The text was updated successfully, but these errors were encountered: