• Register
0 votes
2.3k views

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

local.properties

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

For the windows users:

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

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 17 views
17 views
Problem: URGENT, I need help: Sdk location not found. define location with sdk.dir in the local.properties
asked Mar 14 Wafa Abu Yousef 6.1k points
0 votes
1 answer 1 view
1 view
Problem: What caused the error?
asked 1 day ago zayed1 24.7k points
0 votes
1 answer 6 views
6 views
Problem: Please solve it … Because I am unable to find out the solution... Android sdk location should not contain whitespace
asked Mar 26 Ifra 24.4k points
0 votes
1 answer 3 views
3 views
Problem: As I previously stated in my question, I am having difficulty learning. Could someone help assist me in completing my project?
asked Mar 29 tuhin1 46.7k points
0 votes
1 answer 7 views
7 views
Problem : You have not accepted the license agreements of the following sdk components.
asked Feb 28 Shovo210 13.2k points
0 votes
1 answer 26 views
0 votes
1 answer 20 views
20 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 Mar 6 Wafa Abu Yousef 6.1k points
0 votes
2 answers 6K views
6K 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
1 answer 23 views
23 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