Florian Eula
10/26/2020, 8:59 AMviewModel { ThingyVM(handle = get(), ...) }
When injecting it in my fragment, I properly use
override val viewModel: ThingyVM by viewModel(state = { arguments ?: bundleOf() })
Sometimes, maybe like one launch out of 30, I get a crash,
Caused by: org.koin.core.error.NoBeanDefFoundException: No definition found for class:'androidx.lifecycle.SavedStateHandle'. Check your definitions!
at org.koin.core.scope.Scope.throwDefinitionNotFound(Scope.kt:277)
tynn
10/26/2020, 9:13 AMit.get()
to resolve it in your factory. But if this is the case, it's confusing that it's working most of the time. Have you been able to verify that the view model was actually created?Florian Eula
10/26/2020, 9:15 AMaipok
10/26/2020, 9:23 AMDon't keep activities
and it should crash every time you put app to the background and return to it via recent app list.Florian Eula
10/26/2020, 9:41 AM