找不到SDK位置 [英] SDK Location not found

查看:75
本文介绍了找不到SDK位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近创建了一个新的本地存储库,并从我们的远程存储库中提取了一些代码.

当我打开项目时,我在控制台中收到一条消息:

 版本同步失败:找不到SDK位置.在local.properties文件中使用sdk.dir或使用ANDROID_HOME环境变量来定义位置.有关详细信息,请查阅IDE日志. 

我按照

I created recently a new local repo and pulled some code to it, from our remote repository.

When i open the project, I receive a message in console:

Gradle sync failed: SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
     Consult IDE log for more details

I followed the instructions here to set the environment variable (Im in a Mac) and checked my local.properties:

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

So, both things are settled up, and I am still getting this error. Ive searched, but no solution worked for me.

Any help? Thank you.

EDIT:

This only happens with one project. The rest of the projects works perfectly.

解决方案

In Android Studio:

  1. Open your project navigator
  2. Pick the root item, right click --> Open Module Settings.
  3. In the Android SDK location field, make sure the correct path is selected (up to the sdk folder). See example below:

这篇关于找不到SDK位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆