Support Library Packages - Android Developers
Support Library Packages - Android Developers
Android Developers
In this document
v4 Support Libraries
v4 compat library
v4 core-utils library
v4 core-ui library
v4 media-compat library
v4 fragment library
Multidex Support Library
v7 Support Libraries
v7 appcompat library
v7 cardview library
v7 gridlayout library
v7 mediarouter library
v7 palette library
v7 recyclerview library
v7 preference library
v8 Support Library
v13 Support Library
v14 Preference Support Library
v17 Leanback Library
v17 Preference Library for TV
Vector Drawable Library
Animated Vector Drawable Library
Annotations Support Library
Design Support Library
Custom Tabs Support Library
Percent Support Library
ExifInterface Support Library
Recommendation Support Library for TV
Wear UI Library
See also
https://developer.android.com/topic/libraries/support-library/packages.html#v7-recyclerview 1/15
2/11/2018 Support Library Packages | Android Developers
The Android Support Library contains several library packages that can be included in your
application. Each of these libraries supports a speci c range of Android platform versions and set of
features.
In order to use any of the following libraries, you must download the library les to your Android SDK installation.
Follow the directions for downloading the Support Libraries in Support Library Setup
(https://developer.android.com/tools/support-library/setup.html#download) to complete this step. You must take additional steps
to include a speci c Support Library in your application. See the end of each library section below for important
information on how to include the library in your application.
Note: The minimum SDK version for all support library packages is at least API level 14. Some packages require
a higher API level, as noted below.
v4 Support Libraries
These libraries include the largest set of APIs compared to the other libraries, including support for application
components, user interface features, accessibility, data handling, network connectivity, and programming utilities.
For complete, detailed information about the classes and methods provided by the v4 support libraries, see the
android.support.v4 (https://developer.android.com/reference/android/support/v4/app/package-summary.html) package in the
API reference.
Note: Prior to Support Library revision 24.2.0, there was a single v4 support library. That library was divided into
multiple modules to improve e ciency. For backwards compatibility, if you list support-v4 in your Gradle script,
your APK will include all of the v4 modules. However, to reduce APK size, we recommend that you just list the
speci c modules your app needs.
v4 compat library
Provides compatibility wrappers for a number of framework APIs, such as Context.obtainDrawable() and
View.performAccessibilityAction().
The Gradle build script dependency identi er for this library is as follows:
com.android.support:support-compat:27.0.2
v4 core-utils library
Provides a number of utility classes, such as AsyncTaskLoader
(https://developer.android.com/reference/android/support/v4/content/AsyncTaskLoader.html) and PermissionChecker
(https://developer.android.com/reference/android/support/v4/content/PermissionChecker.html).
https://developer.android.com/topic/libraries/support-library/packages.html#v7-recyclerview 2/15
2/11/2018 Support Library Packages | Android Developers
The Gradle build script dependency identi er for this library is as follows:
com.android.support:support-core-utils:27.0.2
v4 core-ui library
Implements a variety of UI-related components, such as ViewPager
(https://developer.android.com/reference/android/support/v4/view/ViewPager.html), NestedScrollView
(https://developer.android.com/reference/android/support/v4/widget/NestedScrollView.html), and ExploreByTouchHelper
(https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper.html).
The Gradle build script dependency identi er for this library is as follows:
com.android.support:support-core-ui:27.0.2
v4 media-compat library
Backports portions of the media (https://developer.android.com/reference/android/media/package-summary.html) framework,
including MediaBrowser (https://developer.android.com/reference/android/media/browse/MediaBrowser.html) and
MediaSession (https://developer.android.com/reference/android/media/session/MediaSession.html).
The Gradle build script dependency identi er for this library is as follows:
com.android.support:support-media-compat:27.0.2
v4 fragment library
Adds support for encapsulation of user interface and functionality with fragments
(https://developer.android.com/guide/components/fragments.html), enabling applications to provide layouts that adjust between
small and large-screen devices. This module has dependencies on compat (#v4-compat), core-utils (#v4-core-utils), core-
ui (#v4-core-ui), and media-compat (#v4-media-compat).
The Gradle build script dependency identi er for this library is as follows:
com.android.support:support-fragment:27.0.2
https://developer.android.com/topic/libraries/support-library/packages.html#v7-recyclerview 3/15
2/11/2018 Support Library Packages | Android Developers
The Gradle build script dependency identi er for this library is as follows:
com.android.support:multidex:1.0.0
v7 Support Libraries
These libraries provide speci c feature sets and can be included in your application independently from each other.
v7 appcompat library
This library adds support for the Action Bar (https://developer.android.com/guide/topics/ui/actionbar.html) user interface
design pattern (https://developer.android.com/design/patterns/actionbar.html). This library includes support for material design
(https://developer.android.com/design/material/) user interface implementations.
Here are a few of the key classes included in the v7 appcompat library:
ShareActionProvider (https://developer.android.com/reference/android/support/v7/widget/ShareActionProvider.html) -
Adds support for a standardized sharing action (such as email or posting to social applications) that can be
included in an action bar.
The Gradle build script dependency identi er for this library is as follows:
https://developer.android.com/topic/libraries/support-library/packages.html#v7-recyclerview 4/15
2/11/2018 Support Library Packages | Android Developers
com.android.support:appcompat-v7:27.0.2
v7 cardview library
This library adds support for the CardView
(https://developer.android.com/reference/android/support/v7/widget/CardView.html) widget, which lets you show information
inside cards that have a consistent look on any app. These cards are useful for material design implementations,
and are used extensively in layouts for TV apps.
The Gradle build script dependency identi er for this library is as follows:
com.android.support:cardview-v7:27.0.2
v7 gridlayout library
After you download the Android Support Libraries, this library adds support for the GridLayout
(https://developer.android.com/reference/android/support/v7/widget/GridLayout.html) class, which allows you to arrange
user interface elements using a grid of rectangular cells. For detailed information about the v7 gridlayout library
APIs, see the android.support.v7.widget (https://developer.android.com/reference/android/support/v7/widget/package-
The Gradle build script dependency identi er for this library is as follows:
com.android.support:gridlayout-v7:27.0.2
v7 mediarouter library
This library provides MediaRouter (https://developer.android.com/reference/android/support/v7/media/MediaRouter.html),
In general, the APIs in the v7 mediarouter library provide a means of controlling the routing of media channels and
streams from the current device to external screens, speakers, and other destination devices. The library includes
APIs for publishing app-speci c media route providers, for discovering and selecting destination devices, for
checking media status, and more. For detailed information about the v7 mediarouter library APIs, see the
android.support.v7.media (https://developer.android.com/reference/android/support/v7/media/package-summary.html)
The Gradle build script dependency identi er for this library is as follows:
com.android.support:mediarouter-v7:27.0.2
The v7 mediarouter library APIs introduced in Support Library r18 are subject to change in later revisions of the
Support Library. At this time, we recommend using the library only in connection with Google Cast
https://developer.android.com/topic/libraries/support-library/packages.html#v7-recyclerview 5/15
2/11/2018 Support Library Packages | Android Developers
(https://developers.google.com/cast/).
v7 palette library
The v7 palette support library includes the Palette
(https://developer.android.com/reference/android/support/v7/graphics/Palette.html) class, which lets you extract prominent
colors from an image. For example, a music app could use a Palette
(https://developer.android.com/reference/android/support/v7/graphics/Palette.html) object to extract the major colors from
an album cover, and use those colors to build a color-coordinated song title card.
The Gradle build script dependency identi er for this library is as follows:
com.android.support:palette-v7:27.0.2
v7 recyclerview library
The recyclerview library adds the RecyclerView
(https://developer.android.com/reference/android/support/v7/widget/RecyclerView.html) class. This class provides support
for the RecyclerView (https://developer.android.com/training/material/lists-cards.html) widget, a view for e ciently displaying
large data sets by providing a limited window of data items.
The Gradle build script dependency identi er for this library is as follows:
com.android.support:recyclerview-v7:27.0.2
The Gradle build script dependency identi er for this library is as follows:
com.android.support:preference-v7:27.0.2
https://developer.android.com/topic/libraries/support-library/packages.html#v7-recyclerview 6/15
2/11/2018 Support Library Packages | Android Developers
v8 Support Library
This library provides speci c feature sets and can be included in your application independently from other libraries.
v8 renderscript library
This library adds support for the RenderScript (https://developer.android.com/guide/topics/renderscript/compute.html)
computation framework. These APIs are included in the android.support.v8.renderscript
(https://developer.android.com/reference/android/support/v8/renderscript/package-summary.html) package. You should be
aware that the steps for including these APIs in your application is very different from other support library APIs. For
more information about using these APIs in your application, see the RenderScript
(https://developer.android.com/guide/topics/renderscript/compute.html#access-rs-apis) developer guide.
Note: Use of RenderScript with the support library is supported with Android Studio and Gradle-based builds.
The renderscript library is located in the build-tools/$VERSION/renderscript/ folder.
The following example shows the Gradle build script properties for this library:
defaultConfig {
renderscriptTargetApi 18
renderscriptSupportModeEnabled true
}
class and additional fragment support classes. For more information about fragments, see the Fragments
(https://developer.android.com/guide/components/fragments.html) developer guide. For detailed information about the v13
Support Library APIs, see the android.support.v13
(https://developer.android.com/reference/android/support/v13/app/package-summary.html) package in the API reference.
https://developer.android.com/topic/libraries/support-library/packages.html#v7-recyclerview 7/15
2/11/2018 Support Library Packages | Android Developers
The Gradle build script dependency identi er for this library is as follows:
com.android.support:support-v13:27.0.2
summary.html) package provides APIs to add support for preference interfaces such as
PreferenceFragment.OnPreferenceStartFragmentCallback
(https://developer.android.com/reference/android/support/v14/preference/PreferenceFragment.OnPreferenceStartFragmentCallback.
The Gradle build script dependency identi er for this library is as follows:
com.android.support:preference-v14:27.0.2
summary.html) package provides APIs for providing preference interfaces on TV devices, including support for the
LeanbackListPreferenceDialogFragment.ViewHolder.OnItemClickListener
(https://developer.android.com/reference/android/support/v17/preference/LeanbackListPreferenceDialogFragment.ViewHolder.OnIte
This package requires API level 17 or higher. The Gradle build script dependency identi er for this library is as
follows:
com.android.support:preference-leanback-v17:27.0.2
https://developer.android.com/topic/libraries/support-library/packages.html#v7-recyclerview 8/15
2/11/2018 Support Library Packages | Android Developers
summary.html) package provides APIs to support building user interfaces on TV devices. It provides a number of
important widgets for TV apps. Some of the notable classes include:
BrowseFragment (https://developer.android.com/reference/android/support/v17/leanback/app/BrowseFragment.html) -A
fragment for creating a primary layout for browsing categories and rows of media items.
DetailsFragment (https://developer.android.com/reference/android/support/v17/leanback/app/DetailsFragment.html) -A
wrapper fragment for Leanback details screens.
PlaybackOverlayFragment
(https://developer.android.com/reference/android/support/v17/leanback/app/PlaybackOverlayFragment.html) - A subclass of
DetailsFragment (https://developer.android.com/reference/android/support/v17/leanback/app/DetailsFragment.html) for
displaying playback controls and related content.
SearchFragment (https://developer.android.com/reference/android/support/v17/leanback/app/SearchFragment.html) -A
fragment to handle searches. The fragment receives the user's search request and passes it to the application-
provided SearchResultProvider
(https://developer.android.com/reference/android/support/v17/leanback/app/SearchFragment.SearchResultProvider.html). The
SearchResultProvider
(https://developer.android.com/reference/android/support/v17/leanback/app/SearchFragment.SearchResultProvider.html)
This package requires API level 17 or higher. The Gradle build script dependency identi er for this library is as
follows:
com.android.support:leanback-v17:27.0.2
The Gradle build script dependency identi er for this library is as follows:
com.android.support:support-vector-drawable:27.0.2
https://developer.android.com/topic/libraries/support-library/packages.html#v7-recyclerview 9/15
2/11/2018 Support Library Packages | Android Developers
The Gradle build script dependency identi er for this library is as follows:
com.android.support:animated-vector-drawable:27.0.2
The Gradle build script dependency identi er for this library is as follows:
com.android.support:support-annotations:27.0.2
The Design Support library adds support for various material design components and patterns for app developers
to build upon, such as navigation drawers, oating action buttons (FAB), snackbars, and tabs
(https://developer.android.com/design/building-blocks/tabs.html).
The Gradle build script dependency identi er for this library is as follows:
com.android.support:design:27.0.2
https://developer.android.com/topic/libraries/support-library/packages.html#v7-recyclerview 10/15
2/11/2018 Support Library Packages | Android Developers
The Custom Tabs Support library adds support for various classes, such as Custom Tabs Service
(https://developer.android.com/reference/android/support/customtabs/CustomTabsService.html) and Custom Tabs Callback
(https://developer.android.com/reference/android/support/customtabs/CustomTabsCallback.html).
This package requires API level 15 or higher. The Gradle build script dependency identi er for this library is as
follows:
com.android.support:customtabs:27.0.2
Note: As of release 26.0.0, the Percent Support library is deprecated. Clients of this module should migrate to
the new ConstraintLayout (https://developer.android.com/reference/android/support/constraint/ConstraintLayout.html) widget,
which is provided as a separate artifact in SDK Manager.
The Gradle build script dependency identi er for this library is as follows:
com.android.support:percent:27.0.2
The Gradle build script dependency identi er for this library is as follows:
com.android.support:exifinterface:27.0.2
This package requires API level 21 or higher. The Gradle build script dependency identi er for this library is as
follows:
com.android.support:recommendation:27.0.2
Wear UI Library
This library has APIs for building user interfaces for Wear apps. The APIs, available in the
android.support.wear.widget (https://developer.android.com/reference/android/support/wear/widget/package-summary.html)
package, replace the corresponding APIs in the Wearable Support Library.
The Gradle build script dependency identi er for this library is as follows:
com.android.support:wear:27.0.2
https://developer.android.com/topic/libraries/support-library/packages.html#v7-recyclerview 12/15
2/11/2018 Support Library Packages | Android Developers
https://developer.android.com/topic/libraries/support-library/packages.html#v7-recyclerview 13/15
2/11/2018 Support Library Packages | Android Developers
https://developer.android.com/topic/libraries/support-library/packages.html#v7-recyclerview 14/15
2/11/2018 Support Library Packages | Android Developers
https://developer.android.com/topic/libraries/support-library/packages.html#v7-recyclerview 15/15