• Register
0 votes

Problem :

I recently tried to import the sample Android games which I downloaded from Google's developer website. After importing them into my Android Studio, I am getting the below error:

Error: SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

What is this error means? I want to run my sample programs from a Android Studio.

7 5 2
3,870 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

You need to just follow below steps it worked for me:

· Go to the react-native Project then go to the android directory Create the file with below name


· Open a file and paste the Android SDK path as shown below :

For the windows users:


Replace the UserName with your pc user name . Also make sure that the folder is sdk or Sdk. In my case my computer user name is AbhijitJ so my path look like :

sdk.dir=C\:\\Users\\ AbhijitJ \\AppData\\Local\\Android\\sdk

For the Mac users:

sdk.dir = /Users/OSXUSERNAME/Library/Android/sdk

Where the USERNAME is your OSX username

For the Linux (Ubuntu) users:

sdk.dir = /home/LINUXUSERNAME/Android/Sdk

Where USERNAME is your linux username(Linux paths are very case-sensitive: make sure a case of S in Sdk matches)

In case if this doesn't work for you then add ANDROID_HOME variable in the "Environment Variables" as follows C:\Users\USER\AppData\Local\Android\Sdk

9 7 4
38,600 points

Related questions

0 votes
1 answer 11 views
When i am applying Google OBB downloader this problems happens. I am browsing serveral forums however didn’t get the desired result. Anyone here give me the specific solution.
asked Sep 14, 2020 Daniel Anderson 4k points
0 votes
1 answer 43 views
Problem: I am at the moment facing below error in my android studio after importing my Project: Error:(16, 0) Gradle DSL method not found: 'android()' Possible causes: The project 'LoginActivity' may be using a version of Gradle that does not contain the method. ... fuctionality (eg: editing, debugging) will not work properly. Please guide me to get rid of the above problem as soon as possible.
asked Sep 1, 2020 Raphael Pacheco 4.9k points
0 votes
2 answers 5.2K views
Problem : While running the app on a virtual device (AVD) created on Android studio (in a Windows 10), I am getting below error and panic. Emulator: PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT Emulator: Process finished with exit code 1 I have already defined the ANDROID_SDK_ROOT in my environment variables. Can anyone please explain me how to resolve above problem?
asked Jan 23, 2020 jwilliam 3.9k points
0 votes
2 answers 70 views
Problems: I am new, I need help, can anyone help me? Applications on the android os are mostly written in what programming language?
asked Feb 14, 2020 maddi86 5.4k points
0 votes
1 answer 316 views
Problem: Currently I am trying to learn Android programming. I am also trying to make an android studio project and I am learning to debug my Android application. While running my application everything works perfectly fine, but if I try to debug it then I face below error: “Could not connect to remote process. Aborting debug session.” How can I fix this Android issue?
asked Sep 1, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 15 views
Problem: I am very new to Android and Haxm. Now I am facing a very inexplicable error. Virtualization is already turned on .I have installed the haxm successfully. Still if I try to run the application then all of sudden the below error is ... requires hardware acceleration! Please ensure Intel HAXM is properly installed and usable. CPU acceleration status: HAX kernel module is not installed!
asked Aug 26, 2020 Raphael Pacheco 4.9k points