SDK Location not found in android studio
If you are sure that you have assigned correct SDK path in project settings, and you can see it in local.properties as well, but still getting this error then there are chances that you are missing something in you project.
I was getting the same error after looking in to my project I found settings.gradle was missing. and then add following script to your apps build.gradle You will not face this error any more. It worked for me may be gradle set up was the blocking issue
My problem was:
- I cloned a project from github
- I clicked open existing Android Studio project
- I chose the path of the inner sample app instead of the containing folder.
So what you should do is:
- close the project.
- click open existing Android Studio project
- select the parent folder instead of the sample app.
A quick note about this if trying to run a Facebook sample and this error pops up, make sure you select the build.gradle file in the root of Facebook sdk, for all the samples when 'opening an existing project'. I got this error when I tried to open the gradle for just the Scrumptious sample from the 3.22 SDK
You should also change it on Project Structure.
Close the current project and you'll see pop up with 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.
There you go.