Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
655 views
in Technique[技术] by (71.8m points)

android - 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:Androidsdk' 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:Androidsdk) automatically, this is my Windows PC SDK directory, but why it is here now! nothing on code mention any D:Androidsdk.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...