AndroidStudio SDK directory does not exist

Right click your project and select 'Open Module Settings' under SDK Location put your location for your SDK.

paste in /Users/AhmadMusa/Library/Android/sdk

Clean and rebuild your project

Update

Try to delete your local.properties file and create a new one, but do not check it into version control.

Right click top level of project and Create new file 'local.properties' then add: sdk.dir=/Users/AhmadMusa/Library/Android/sdk

Clean and build


I finally find this file on the disk.The 'local.properties' file in The Android studio is not which you modify.see the picture,so you can modify this line 'sdk.dir' to your dir of sdk.Remember not in the android studio. enter image description here


This is a problem when you open the project incorrectly. open the project do not import the project


Create or edit file local.properties under android directory

For window path should be like this

sdk.dir = C\:\\Users\\user name\\AppData\\Local\\Android\\sdk

For linux system path should be like this

sdk.dir = /home/user name/Android/Sdk/

I solve this problem, the reason is: You downloaded other's projects. His local.properties file content is his SDK path. You must replace SDK path with your local SDK path, then rebuild the project.