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.
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.
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.
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 ".
In Android Studio:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With