AndroidX overview

The androidx namespace comprises the Android Jetpack libraries. Like the Support Library, libraries in the androidx namespace ship separately from the Android platform and provide backward compatibility across Android releases.

AndroidX is a major improvement to the original Android Support Library, which is no longer maintained. androidx packages fully replace the Support Library by providing feature parity and new libraries.

In addition, AndroidX includes the following features:

  • All packages in AndroidX live in a consistent namespace starting with the string androidx. The Support Library packages have been mapped into corresponding androidx.* packages. For a full mapping of all the old classes and build artifacts to the new ones, see the Package Refactoring page.

  • Unlike the Support Library, androidx packages are separately maintained and updated. The androidx packages use strict Semantic Versioning, starting with version 1.0.0. You can update AndroidX libraries in your project independently.

  • Version 28.0.0 is the last release of the Support Library. There will be no more android.support library releases. All new feature development will be in the androidx namespace.

Using androidx libraries in your project

Current AGP supports using the androidx libraries by default. See Migrating to AndroidX to learn how to migrate an existing project.

For projects that haven't migrated, or have legacy dependencies that have not, AGP provides the following flags that can be set in your project's gradle.properties file.

  • android.useAndroidX: True by default in Android Gradle Plugin 9.0.0 and later, false in versions earlier than 9.0.0. When this flag is set to true, the Android plugin uses the appropriate AndroidX library instead of a Support Library. The ability to set this flag to false is planned to be removed in AGP 10.
  • android.enableJetifier: When this flag is set to true, the Android plugin automatically migrates existing third-party libraries to use AndroidX dependencies by rewriting their binaries. The flag is false by default if it is not specified, and is planned to be removed in AGP 10, as published libraries have generally completed the migration.

API Reference

All the packages and classes in the androidx namespace can be found in the AndroidX reference section.

Additional Resources

Learn more about components on the Jetpack home page. For more information about the package refactoring from the Support Library to androidx, see the blog post on that topic.