Open In App

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

Improve
Improve
Like Article
Like
Save
Share
Report

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.dir = C:\Users\UserName\AppData\Android\sdk

The username above is the name of your PC. If you are not able to see AppData Folder then you have to change the View settings of File Explorer and mark Hidden Items.

Step 1. Go to the top of File Explorer and open drop-down

Step 2. Now go to View > Hidden Items

If this doesn’t work, Add ANDROID_HOME in Environment Variables. Go to System Properties -> Environment Variables -> Add Variable -> put Variable Name and Value.

Step 1. Open System Properties

Step 2. Select New and Insert Variable and Location

Step 3. Add Variable name: ANDROID_HOME and value: as your SDK path.

If your path is something else not in C Drive you have to add that. Make sure you enter the correct path UserName below is the name of your PC. and press OK. 

Now check the SDK location in your Android Studio and follow these steps.

Step 1. Go to the FILE > SETTINGS

Step 2. Search for SDK and place your SDK LOCATION.


Last Updated : 09 Feb, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads