Status Update
Comments
il...@google.com <il...@google.com> #2
To use
The issue is happening because, starting from LocalLifecycleOwner
has been moved from androidx.compose.ui
to lifecycle-runtime-compose
, as outlined in their respective release notes. For compatibility reasons, you must update both dependencies.
For context, note these changes were made to enable the utilization of its Compose-based helper APIs beyond Compose UI (such as in
If the issue persists even after updating your Compose UI, please let us know.
Edit: please see
ap...@google.com <ap...@google.com> #3
If this change has made both libraries version dependent, it seems that guide them to the release note so that users will not experience difficulties :)
jb...@google.com <jb...@google.com> #4
lifecycle 2.8.0 is now stable but compose UI 1.7.0 is still in beta.
na...@google.com <na...@google.com> #5
Same problem here. Lifecycle 2.8.0
is now stable but Compose UI 1.7.0
is still beta. Of course our Dependabot didn't know about this relationship between dependencies 😬
Description
Component used: androidx.lifecycle.viewmodel
Version used: 2.5.0
Description:
Since lifecycle 2.5.0,
ViewModelProvider
createsViewModel
instance withViewModelFactory.create(modelClass, extra)
method if this method is implemented.In
ViewModelProvider.AndroidViewModelFactory
class case, it provides both ofcreate(modelClass, extra)
andcreate(modelClass)
, but it will always usecreate(modelClass, extra)
only.create(modelClass)
method is not used anymore if class is inherited fromViewModelProvider.AndroidViewModelFactory
,ViewModelProvider.AndroidViewModelFactory.create(modelClass)
create(modelClass)
method only instead ofcreate(modelClass, extra)
forViewModelProvider.AndroidViewModelFactory
class.