Getting started with Android Jetpack

Jetpack encompasses a collection of Android libraries that incorporate best practices and provide backwards compatibility in your Android apps.

The Jetpack guide to app architecture provides an overview of the best practices and recommended architecture to consider as you build your Android app.

The following sections cover how you can get started using Jetpack components.

Use a Jetpack library in your app

All Jetpack components are available on the Google Maven repository.

Open the build.gradle file for your project and add the google() repository as shown below:

allprojects {
    repositories {

You can then add Jetpack components, such as architecture components like LiveData and ViewModel, as shown here:

dependencies {
    def lifecycle_version = "2.2.0"
    implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
    implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"

Many Jetpack libraries provide Android KTX extensions as shown above with lifecycle-livedata-ktx and lifecycle-viewmodel-ktx. The KTX extensions build upon the Java-based API, taking advantage of Kotlin-specific language features.

To learn of new Jetpack library releases, check out the Releases page.

Kotlin-based and Java-based API reference pages are available for all Jetpack libraries.

Take advantage of Jetpack

Jetpack libraries may be used alone or in combination to address different needs in your apps.

  • WorkManager for your background scheduling needs.
  • Room for data storage persistence.
  • Navigation to manage your application navigation flow.
  • CameraX for your camera app needs.
  • See the Overview of all the Jetpack libraries.

Jetpack libraries are published in the androidx namespace. If your project currently uses the Android Support Library, read how to migrate to the androidx namespace.

To learn more about using Jetpack, check out these pages:

Additional resources

Online training

Sample code

  • The Sunflower demo app uses many different Jetpack components to demonstrate Android development best practices.