The Wayback Machine - https://web.archive.org/web/20240630214308/https://www.geeksforgeeks.org/different-ways-to-change-android-sdk-path-in-android-studio/
Open In App

Different Ways to Change Android SDK Path in Android Studio

Last Updated : 31 Oct, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Android SDK is one of the most useful components which is required to develop Android Applications. Android SDK is also referred to as the Android Software Development Kit which provides so many features which are required in Android which are given below: 

  • A sample source code.
  • An Emulator.
  • Debugger.
  • Required set of libraries.
  • Required APIs for Android development with their documentation.
  • Tutorials required for Android OS development.

Why There is a Need to Change Android SDK Path? 

Android SDK comes itself when we download Android Studio. It downloads when we download our Android Studio. But many times due to some issue in our pc these SDK files may get deleted. And without your Android SDK Android studio is not able to work and we cannot develop any application. Android SDK is the heart of Android studio. We can easily download Android SDK from the android developers’ site, but we have to set the path for this SDK in our Android studio as well to use this SDK. 

Now the point that comes here is how we can change the SDK path for our Android application in Android Studio. So in this article, we are going to discuss three different methods to Change Android SDK Path in Android Studio.   

Method 1

Step 1: Create a new Project in Android Studio 

Navigate to the File > New > New Project and create your new project. The language used for this will not matter as this process will be the same for both java as well as Kotlin. 

Step 2: Opening project structure

Navigate to the File > Click on Project structure which is shown in the list and click on the Project structure option. After clicking that option you will get to see the below screen. 

Inside the above screen, click on the SDK Location option you will get to see the below screen. 

In the above image, you will get to see the current SDK location for your Android Studio. To change this SDK location you have to click on the 3 dots which are being displayed and then select your SDK location folder. After selecting this folder click on the OK option to save your SDK path. 

Step 3: Sync your project after adding your SDK path 

Now sync your project with Gradle files to check that SDK is working fine. To do this click on File > you will get to see the option as Sync Project With Gradle files option click on that option and sync your project. On successful sync of your project, your SDK location is set perfectly and now you are good to go in developing Android Applications. 

Method 2 

Step 1: Create a new Project in Android Studio 

Navigate to the File > New > New Project and create your new project. The language used for this will not matter as this process will be the same for both java as well as Kotlin. 

Step 2: Opening Android Studio Settings

Navigate to the File > Settings option you will get to see below dialog screen. Inside that screen. Click on Appearance and Behavior option > System Settings options and then click on the Android SDK option to get to see the below screen.

Inside this screen, you will get to see your SDK path. You can update your SDK path by clicking on the Edit option. After that select your SDK path, then click on Apply option, and then click on the OK option.  

Step 3: Sync your project after adding your SDK path 

Now sync your project with Gradle files to check that SDK is working fine. To do this click on File > you will get to see the option as Sync Project With Gradle files option click on that option and sync your project. On successful sync of your project, your SDK location is set perfectly and now you are good to go in developing Android Applications. 

Method 3

Step 1: Create a new Project in Android Studio 

Navigate to the File > New > New Project and create your new project. The language used for this will not matter as this process will be the same for both java as well as Kotlin. 

Step 2: Opening project structure. 

Inside your Android Studio in the top right corner, You can get to see the icon below the image for opening the project structure. Click on that option to open your project structure option. You will get to see the below screen. For opening this Project Structure we can also use a shortcut key as: 

Operating System

Shortcut Key

Windows Ctrl+Alt+Shift+S
Mac OS Command + ; (semi-colon)
Linux Ctrl+Alt+Shift+S

After clicking on this option we simply have to follow Step 1 to update our Android SDK. 

Inside the above screen, click on the SDK Location option you will get to see the below screen.  

In the above image, you will get to see the current SDK location for your Android Studio. To change this SDK location you have to click on the 3 dots which are being displayed and then select your SDK location folder. After selecting this folder click on the OK option to save your SDK path.  

Step 3: Sync your project after adding your SDK path 

Now sync your project with Gradle files to check that SDK is working fine. To do this click on File > you will get to see the option as Sync Project With Gradle files option click on that option and sync your project. On successful sync of your project, your SDK location is set perfectly and now you are good to go in developing Android Applications. 



Similar Reads

Fix "SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable" in Android Studio
SDK is a Software Development Kit. SDK brings together a group of tools that enable programming for Mobile Applications such as Android, and iOS. You can download SDK from the official Google Developers Website for Android and then Extract/put it in the default folder if there is no such then make it. The Default Path of SDK in PC is: Windows: sdk.
2 min read
Different Ways to Fix “Select Android SDK” Error in Android Studio
Android SDK is one of the most useful components which is required to develop Android Applications. Android SDK is also referred to as the Android Software Development Kit which provides so many features which are required in Android which are given below: A sample source code.An Emulator.Debugger.Required set of libraries.Required APIs for Android
5 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 the 1.7.0_21 folder. Well, this is exactly what is
4 min read
How to Change the API SDK Level in Android Studio?
Generally, API level means the Android Version. This determines which version the developers are targeting their application and what is going to be the minimum level of the android version in their application will run. For setting the Minimum level and Maximum level android studio provides two terminologies. minSdkVersion: This means the minimum
2 min read
How to Fix “Failed to install the following Android SDK packages as some licenses have not been accepted” Error in Android Studio?
When you download the latest Android SDK tools version using the command line to install SDKs and you just try to build gradle then this error shows up: Failed to install the following Android SDK packages as some licenses have not been accepted. platforms;android-27 Android SDK Platform 27 build-tools;27.0.3 Android SDK Build-Tools 27.0.3 To build
4 min read
Different Ways to Change or Add Themes to Android Studio
When we are working on any editor or IDE we get used to it and its environment like if we are using Sublime then we like its dark background environment. We have now moved to Android studio but we are not comfortable with the default background and theme. Now the point that comes here is how we can Change or Add Themes to Android Studio. So in this
3 min read
Different Ways to Change the Project Name in Android Studio
When you have worked a lot on an Android project and then if you need to rename the project there are lots of configuration files, .xml files, and gradle files in Android Studio that you’re afraid to break things up. Sometimes we end up creating a new Android Studio project, with the correct name and then pass the source files from the old project
2 min read
How to Fix "SDK location not found" in Android Studio?
Google developed Android SDK which is a Software Development Kit developed by Google for the Android platform. You can create Android apps using Android SDK, and you don't need to be an expert to use it. Android SDK and Android Studio come bundled together, with Google's official integrated development environment (IDE) for the Android operating sy
2 min read
Fix “SDK tools directory is missing” Error in Android Studio
Sometimes it happens with developers that when he/she starts the "android studio" program, displayed a window of "downloading components" which says: "Android SDK was installed to C: / Users / user / AppData / Local / android / SDK2 SDK tools directory is missing ". So to fix "SDK tools directory missing" in android studio, try the following method
2 min read
Fix "Unable to locate adb within SDK" in Android Studio
The following error occurs when the adb file is not found within the SDK system folder. A software development kit (SDK) provides the software required to build your applications for a target platform. Firstly check if the adb is present in the SDK folder. For this, open C:\Users\Username\AppData\Local\Android\Sdk\platform-tools and check if adb.ex
2 min read