Lifecycle     Android Developers
DRANK

Lifecycle-aware components perform actions in response to a change in the lifecycle status of another component, such as activities and fragments. These components help you produce better-organized, and often lighter-weight code, that is easier to maintain.This table lists all the artifacts in the androidx.lifecycle group.ArtifactCurrent Stable ReleaseNext Release CandidateBeta ReleaseAlpha Releaselifecycle-*2.3.0---lifecycle-viewmodel-compose---1.0.0-alpha01This library was last updated on: February 10, 2021Declaring dependenciesTo add a dependency on Lifecycle, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.Add the dependencies for the artifacts you need in the build.gradle file for your app or module:The APIs in lifecycle-extensions have been deprecated. Instead, add dependencies for the specific Lifecycle artifacts you need.Kotlindependencies { def lifecycle_version = "2.3.0" def arch_version = "2.1.0" // V…

developer.android.com
Related Topics: Android
1 comments