How to Add Support Library to Android Studio Project?
Last Updated :
23 Jun, 2021
An android support library is part of Android SDK tools. You can use the Android Support Library for backward-compatible versions of new Android features and additional UI elements and features not included in the standard Android framework. Each package in the support library has a version number in three parts (X.Y.Z) that correspond to an Android API level, and a particular library revision For example, a support library version number of 22.3.4 is version 3.4 of the support library for API 22.
As a general rule, use the most recent version of the support library for the API your app is compiled and targeted for, or a newer version. For example, if your app targets API 25, use version 25.X.X of the support library.
Download the Support Library
Step 1: In Android Studio, select Tools > Android > SDK Manager, or click the SDK Manager icon. The SDK Manager preference pane appears.
Step 2: Click the SDK Tools tab and expand the Support Repository.
Step 3: Look for Android Support Repository in the list.
- If Installed appears in the Status column, you’re all set. Click Cancel.
- If Not installed or Update Available appears, click the checkbox next to Android Support Repository. A download icon should appear next to the checkbox. Click OK.
Step 4: Click OK again, and then Finish when the support repository has been installed.

Add the Dependency to Your build.gradle File
The Gradle scripts for your project manage how your app is built, including specifying your app’s dependencies on other libraries. To add a support library to your project, modify your Gradle build files to include the dependency to that library you found in the previous section.
Step 1: In Android Studio, make sure the Project pane is open and the Android tab is clicked.
Step 2: Expand Gradle Scripts, if necessary, and open the build.gradle (Module: app) file. Note that build.gradle for the overall project (build.gradle (Project: app_name) is a different file from the build.gradle for the app module.
Step 3: Locate the dependencies section of build.gradle, near the end of the file. The dependencies section for a new project may already include dependencies in several other libraries.
Step 4: Add a dependency for the support library that includes the statement you copied in the previous task. For example, a complete dependency on the design support library looks like this:
compile 'com.android.support:design:23.3.0'
Step 5: Update the version number, if necessary. If the version number you specified is lower than the currently available library version number, Android Studio will warn you that an updated version is available. (“a newer version of com.android.support:design is available”). Edit the version number to the updated version, or type Shift+Enter and choose “Change to XX.X.X” where XX.X.X is the updated version number.
Step 6: Click Sync Now to sync your updated Gradle files with the project, if prompted.

Your Gradle file will look something like this in the above picture.
Similar Reads
How to Add a Library Project to Android Studio?
Adding an external library in Android Studio is a very common thing but still, most beginners or freshers find it difficult to do. Some of you must have gone through this. Whenever you want to add some external library and you try to do that with maven(File > Project Structure > Dependencies)
4 min read
How to Add External Library in Android Studio?
Android Studio is the official IDE (Integrated Development Environment) for Android app development and it is based on JetBrainsâ IntelliJ IDEA software. Android Studio provides many excellent features that enhance productivity when building Android apps. In this article, we will learn how to add ex
2 min read
How to Create/Start a New Project in Android Studio?
After successfully installing the Android Studio and opening it for the first time. We need to start with some new projects to start our journey in Android. In this article, we will learn about How to Create a New Project in Android Studio. Steps to Create/Start a New Android Project in Android Stud
2 min read
How to Include *.so Library in Android Studio?
The SO file stands for Shared Library. You compile all C++ code into the.SO file when you write it in C or C++. The SO file is a shared object library that may be dynamically loaded during Android runtime. Library files are larger, often ranging from 2MB to 10MB in size. As a result, the app becomes
3 min read
How to Add Local HTML File in Android Studio?
HTML stands for HyperText Markup Language. It is used to design web pages using a markup language. HTML is the combination of Hypertext and Markup language. Hypertext defines the link between the web pages. A markup language is used to define the text document within the tag which defines the struct
3 min read
How to Clone Android Project from GitHub in Android Studio?
Android Studio provides a platform where one can build apps for Android phones, tablets, Android Wear, Android TV, and Android Auto. Android Studio is the official IDE for Android application development, based on IntelliJ IDEA. One can develop Android Applications using Kotlin or Java as the Backen
3 min read
Top 10 Android Project Ideas With Source Code
Android Projects refers to the development of the software in the Android platforms which mainly focuses on the creation of software applications by the software developers for the Android operating system. These project apps help to cover multiple topics such as database design, navigation, testing
7 min read
How to Set Java SDK Path in Android Studio?
The Java SDK for Android is a sophisticated suite of tools for managing, monitoring, profiling, and debugging Java code written in Android Studio. But sometimes as software is unpredictable you might be caught in an error that Android Studio stopped compiling projects and says that it can't locate t
4 min read
How to Upload Project on GitHub from Android Studio?
Learning how to upload a project to GitHub from Android Studio is an essential skill for developers, as it allows you to share your code, collaborate with others, and manage version control. With GitHub integration in Android Studio, it's easy to push your project to a repository. This guide will wa
3 min read
How to Install Android Studio on Ubuntu?
Android Studio is a full-featured cross-platform IDE that helps us to build applications for Android devices. Android Studio is based on JetBrains' IntelliJ IDEA. This IDE includes everything we need for Android development. Android Studio build system is powered by Gradle allowing you to make multi
5 min read