I recently tried to import sample Android games I downloaded from Google's developer website. After importing them into Android Studio, I'm getting the following error:
Error: SDK location not found. Define location with
sdk.dir
in the local.properties file or with anANDROID_HOME
environment variable.
What is this? I want to run the sample programs from Android Studio.
Best Answer
Please follow below steps it work's for me:
For windows users:
Replace UserName with your pc user name . Also make sure the folder is sdk or Sdk. In my case my computer user name is Zahid so the path look like:
For Mac users:
Where USERNAME is your OSX username.
For Linux (Ubuntu) users:
Where USERNAME is your linux username(Linux paths are case-sensitive: make sure the case of
S
inSdk
matches)In case if this doesn't work, add ANDROID_HOME variable in "Environment Variables" as
C:\Users\USER\AppData\Local\Android\Sdk