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
.
If you have downloaded the AS + SDK bundle: Note #2: you will never find the SDK in the Android Studio directory unless you have explicitly put it in there. The reason is that those directories might be deleted after installing a newer version of Android Studio and you would have to re-install the SDK as well.
Quick fix: Uninstall Android SDK (default location C:\Users\.. \AppData\Local\Android\Sdk ) and install it again. This time affirms the minimum required storage space at your place of download. After execution check, if tools folder is now added in SDK directory.
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 ".
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.
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.
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