Open In App

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 system. 

In this article, we see how to fix an error that is related to the main Android building component of Android Studio that is the Android SDK. The most common error related to Android SDK is “SDK location not found“. This message pops up stating that the location of Android SDK was not detected when the path of SDK is assigned incorrectly. There can also be other reasons for this error message as well and we will see ways to get rid of this error.



When switching from one IDE to another (Like from Eclipse to Android Studio)

Method 1

In this case, follow the below steps: 



  1. For Windows user – sdk.dir=C:\\users\\Username\\AppData\\Local\\Android\\sdk
  2. For Mac user – sdk.dir = /users/Username/Library/Android/sdk (Replace Username with your PC name)

Method 2

In case the above procedure doesn’t work then add the ANDROID_HOME variable in “Environment Variables” as C:\Users\Username\AppData\Local\Android\Sdk.

Method 3

In case it does not work even then, then you need to change the directory path on Project Structure as well.

Method 4

A settings.gradle file might be missing from the project. Make sure that the file exists from the project you are importing. If not add the settings.gradle file with the following: 

include ':app'

Save the file and put it in the top-level folder in your project.

Article Tags :