Skip to content

Migrating to the AppCompat Library

Roger Hu edited this page Jul 15, 2019 · 44 revisions

Overview

The AppCompat support library enables the use of the ActionBar and Material Design specific implementations such as Toolbar for older devices down to Android v2.1.

Caution: Starting with Support Library release 26.0.0 (July 2017), the minimum supported API level across most support libraries has increased to Android 4.0 (API level 14) for most library packages https://developer.android.com/topic/libraries/support-library/index.html#api-versions

Android Studio v3.4.1 and higher will now start forcing AndroidX namespaces. See this document for migrating libraries and imports.

android {
    compileSdkVersion 29
}

dependencies {
    // See https://developer.android.com/jetpack/androidx/releases/appcompat
    implementation 'androidx.appcompat:appcompat-1.0.2'
}

References

Finding these guides helpful?

We need help from the broader community to improve these guides, add new topics and keep the topics up-to-date. See our contribution guidelines here and our topic issues list for great ways to help out.

Check these same guides through our standalone viewer for a better browsing experience and an improved search. Follow us on twitter @codepath for access to more useful Android development resources.

Clone this wiki locally