Status Update
Comments
al...@google.com <al...@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
jb...@google.com <jb...@google.com>
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.
Description
ViewModelProviderKt
exists in bothlifecycle-viewmodel-ktx:2.3.1
, which gets pulled in transitively byappcompat
, andlifecycle-viewmodel
at head. If I updateappcompat
tolifecycle-viewmodel
it's going to cause a classpath conflict for a lot of external clients.Dependency constraints should be used here, but Gradle has several bugs in dependency constraint resolution that prevent us from using it (seehttps://github.com/gradle/gradle/issues/19882 ).
Please use a different
JvmName
for the class inlifecycle-viewmodel
so that we can avoid the conflict without needing to blocklifecycle-viewmodel
orappcompat
's release on Gradle fixing their bugs.