Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SDK Location not found

Tags:

git

android

I created recently a new local repo and pulled some code to it, from our remote repository.

When i open the project, I receive a message in console:

Gradle sync failed: SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
     Consult IDE log for more details

I followed the instructions here to set the environment variable (Im in a Mac) and checked my local.properties:

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

So, both things are settled up, and I am still getting this error. Ive searched, but no solution worked for me.

Any help? Thank you.

EDIT:

This only happens with one project. The rest of the projects works perfectly.

like image 470
Fustigador Avatar asked Aug 24 '15 08:08

Fustigador


People also ask

How do I fix SDK location not found?

Close the current project and you'll see a pop-up with a dialog which will then proceed to Configure option. Configure -> Project Defaults -> Project Structure -> SDKs on left column -> Android SDK Home Path -> give the exact path as you did on local. properties and select Valid Target.

Can not find Android SDK folder?

If you have downloaded the AS + SDK bundle: If it is missing at this location, one of the following reasons apply: you have chosen a custom location, you missed to install the SDK at all, or (unlikely) they have changed the default install location.

Where is Android SDK found?

by default, the "Android Studio IDE" will be installed in " C:\Program Files\Android\Android Studio ", and the "Android SDK" in " c:\Users\username\AppData\Local\Android\Sdk ".


1 Answers

In Android Studio:

  1. Open your project navigator
  2. Pick the root item, right click --> Open Module Settings.
  3. In the Android SDK location field, make sure the correct path is selected (up to the sdk folder). See example below:

enter image description here

like image 107
Gil Moshayof Avatar answered Sep 23 '22 03:09

Gil Moshayof