AndroidX - Android Extension Library

Android X or Extension New Name and Packaging for the Andrioid Support Library .

What is Support Library ?

The Android Support Library package is a set of code libraries that provide backward-compatible versions of Android framework APIs as well as features that are only available through the library APIs. Each Support Library is backward-compatible to a specific Android API level.

What is AndroidX?

AndroidX is the open-source project that the Android team uses to develop, test, package, version and release libraries within Jetpack.
Like the Support Library, AndroidX ships separately from the Android OS and provides backwards-compatibility across Android releases .

Need of AndroidX

The Organic growth of the library has become confusing .

There are Components and packages named "v7" when the minimal SDK level we support is 14 .

Weired packing name diffcult to change and confusing hard to change .

Classes like PackageManager, which are bundled with the operating system and can have different APIs and behavior for different Android versions

Classes like AppCompatActivity or ViewModel, which are unbundled from the operating system and ship in your apk. These libraries are written to provide a single API surface with behavior that's as consistent as possible across Android versions.

Bundled libraries : bundled with OS can have different API and behavior. UnBundled libraries : (androidx.) unbundled from OS and ships in your apk.

AndroidX uses Semantic-version

Previously, support libraryuse SDK version but AndroidX use the Semantic-version. It’s going to re-version from 28.0.0 → 1.0.0.

Generally, you can expect the following mapping from old to new packages:

Support Library Components have been moved under androidx and their package name simplified .

OLD

New

android.support.**

androidx.@

android.databinding.**

androidx.databinding.@

android.design.**

com.google.android.material.@

The Architecture Components libraries have also been moved under androidx and their package names simplified .