Caused by: java.lang.NoSuchMethodException: androidx.lifecycle.ViewModel.getTag [class java.lang.String]
Opened this issue · 0 comments
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:502)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:984)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:984)
Caused by: java.lang.NoSuchMethodException: androidx.lifecycle.ViewModel.getTag [class java.lang.String]
at java.lang.Class.getMethod(Class.java:2072)
at java.lang.Class.getDeclaredMethod(Class.java:2050)
at com.skydoves.viewmodel.lifecycle.CloseableViewModelLifecycleKt.getViewModelLifecycleOwner(CloseableViewModelLifecycle.kt:36)
at com.meetfriend.app.ui.home.create.viewmodel.AddNewPostViewModel.getLiveDataInfo(AddNewPostViewModel.kt:157)
at com.meetfriend.app.ui.home.ProgressDialogFragment.loadDataFromIntent(ProgressDialogFragment.kt:88)
at com.meetfriend.app.ui.home.ProgressDialogFragment.onViewCreated(ProgressDialogFragment.kt:79)
i am using latest version of this library.
code :-
fun getLiveDataInfo() {
viewModelLifecycleOwner.let {
cloudFlareRepository.getLiveData().observe(it) {
Timber.tag("getLiveDataInfo").i("LiveData : $it")
// addNewPostStateSubjects.onNext(AddNewPostViewState.ProgressDisplay(it))
}
}
}
// in cloudFlareRepository
private var data: MutableLiveData = MutableLiveData().apply {
value = 0.0 // Or some other default value
}
fun getLiveData(): LiveData {
return data
}