force close app after upgrade to 2.43 [Jetapack Compose]
See original GitHub issuejava.lang.IllegalArgumentException: CreationExtras must have a value by `SAVED_STATE_REGISTRY_OWNER_KEY`
at androidx.lifecycle.SavedStateHandleSupport.createSavedStateHandle(SavedStateHandleSupport.kt:91)
at androidx.lifecycle.AbstractSavedStateViewModelFactory.create(AbstractSavedStateViewModelFactory.java:89)
at dagger.hilt.android.internal.lifecycle.HiltViewModelFactory.create(HiltViewModelFactory.java:111)
at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.kt:187)
at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.kt:153)
at androidx.lifecycle.viewmodel.compose.ViewModelKt.get(ViewModel.kt:215)
at androidx.lifecycle.viewmodel.compose.ViewModelKt.get$default(ViewModel.kt:195)
at androidx.lifecycle.viewmodel.compose.ViewModelKt.viewModel(ViewModel.kt:120)
.....
dependencies:
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.5.0'
implementation 'androidx.hilt:hilt-navigation-compose:1.0.0'
implementation 'androidx.activity:activity-compose:1.5.0'
Issue Analytics
- State:
- Created a year ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Jetpack Compose: close application by button - Stack Overflow
NavController can't pop programmatically the latest @Composable in the stack. I.e. popBackStack() doesn't work if it's a root page. So the ...
Read more >Android Jetpack Compose - Close Application By Button
In this article, we will take a look at How to quit an android application programmatically using Jetpack Compose.
Read more >Clean Android multi-module offline-first scalable app in 2022
The main intention was to show good practices using Kotlin features and latest Android libraries from Jetpack in the simplest possible way, ...
Read more >Side-effects in Compose - Android Developers
A side-effect is a change to the state of the app that happens outside the scope of a composable function.
Read more >Let's Build a Stopwatch Application with Jetpack Compose!
Let's Build a Stopwatch Application with Jetpack Compose ! ... Be sure to watch the hole video, since there are lots of important...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had the same issue and resolved it by adding
implementation("androidx.fragment:fragment-ktx:1.5.1")
dependency.Fragment.viewModels()
is defined in this library and previously it was only transitive dependency resolved to the older version.We had also experienced this error in the Home Assistant app. We already had the
navigation-compose
dependency mentioned. We needed to addandroidx.fragment
dependency and the crash went away. Just commenting here for the next person who may get stuck 😃