Ahmad Musa Ahmad Musa - 18 days ago 7
Android Question

AndroidStudio SDK directory does not exists

I am using Android Studio for a project on SVN (usually on Windows PCs).

Lately I want to run this on a Mac, it keep giving the below error:


Error:The SDK directory '/Users/AhmadMusa/Desktop/[PROJECT PATH]/D:\Android\sdk' does not exist.

Please fix the 'sdk.dir' property in the local.properties file.


I already put the SDK on local.properties file as:


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


I don't know why it keep adding the (D:\Android\sdk) automatically, this is my Windows PC SDK directory, but why it is here now! nothing on code mention any
D:\Android\sdk
.

Answer

You cannot edit local.properties it is a generated file, right click your project and select 'Open Module Settings' under SDK Location put your location for your SDK.

past 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

Comments