Skip to content

Most visited

Recently visited


Support Library Setup

How you setup the Android Support Libraries in your development project depends on what features you want to use and what range of Android platform versions you want to support with your application.

This document guides you through downloading the Support Library package and adding libraries to your development environment.

The support libraries are now available through Google's Maven repository. We no longer support downloading the libraries through the SDK Manager, and that functionality will be removed soon..

Choosing Support Libraries

Before adding a Support Library to your application, decide what features you want to include and the lowest Android versions you want to support. For more information on the features provided by the different libraries, see Support Library Features.

Adding Support Libraries

In order to use a Support Library, you must modify your application's project's classpath dependencies within your development environment. You must perform this procedure for each Support Library you want to use.

To add a Support Library to your application project:

  1. Open the build.gradle file for your application.
  2. Make sure that the repositories section includes a maven section with the "" endpoint. For example:
    allprojects {
        repositories {
            maven {
                url ""
  3. Add the support library to the dependencies section. For example, to add the v4 core-utils library, add the following lines:
    dependencies {
        compile ""

Caution: Using dynamic dependencies (for example, palette-v7:23.0.+) can cause unexpected version updates and regression incompatibilities. We recommend that you explicitly specify a library version (for example, palette-v7:27.0.2).

Using Support Library APIs

Support Library classes that provide support for existing framework APIs typically have the same name as framework class but are located in the class packages, or have a *Compat suffix.

Caution: When using classes from the Support Library, be certain you import the class from the appropriate package. For example, when applying the ActionBar class:

  • when using the Support Library.
  • when developing only for API level 11 or higher.

Note: After including the Support Library in your application project, we strongly recommend using the ProGuard tool to prepare your application APK for release. In addition to protecting your source code, the ProGuard tool also removes unused classes from any libraries you include in your application, which keeps the download size of your application as small as possible. For more information, see ProGuard.

Further guidance for using some Support Library features is provided in the Android developer training classes, guides and samples. For more information about the individual Support Library classes and methods, see the packages in the API reference.

Manifest Declaration Changes

If you are increasing the backward compatibility of your existing application to an earlier version of the Android API with the Support Library, make sure to update your application's manifest. Specifically, you should update the android:minSdkVersion element of the <uses-sdk> tag in the manifest to the new, lower version number, as shown below:

      android:targetSdkVersion="23" />

The manifest setting tells Google Play that your application can be installed on devices with Android 4.0 (API level 14) and higher.

If you are using Gradle build files, the minSdkVersion setting in the build file overrides the manifest settings.

apply plugin: ''

android {

    defaultConfig {
        minSdkVersion 16

In this case, the build file setting tells Google Play that the default build variant of your application can be installed on devices with Android 4.1 (API level 16) and higher. For more information about build variants, see Build System Overview.

Note: If you are including several support libraries, the minimum SDK version must be the highest version required by any of the specified libraries. For example, if your app includes both the v14 Preference Support library and the v17 Leanback library, your minimum SDK version must be 17 or higher.

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields


Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience. (Dec 2017 Android Platform & Tools Survey)