SDK的位置没有找到。与local.properties文件或者与ANDROID_HOME环境变量sdk.dir限定位置 [英] SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable

查看:15789
本文介绍了SDK的位置没有找到。与local.properties文件或者与ANDROID_HOME环境变量sdk.dir限定位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近尝试导入示例Android游戏,我从谷歌的开发者网站下载。将它们导入到Android的工作室后,我得到了以下错误:

I recently tried to import sample Android games I downloaded from Google's developer website. After importing them into Android Studio, I'm getting the following error:

错误:未找到SDK位置。与 sdk.dir 在local.properties文件,或与 ANDROID_HOME 环境变量定义的位置。

Error: SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

这是什么?我想运行的Andr​​oid Studio中的示例程序。

What is this? I want to run the sample programs from Android Studio.

推荐答案

该项目可能忽略了 settings.gradle 文件。确保文件从要导入的项目存在。如果没有用下面的添加 settings.gradle 文件:

The project might be missing a settings.gradle file. Make sure that file exists from the project you are importing. If not add the settings.gradle file with the following :


包括:应用程序

保存文件,并把它在顶层文件夹中的项目。

Save the file and put it at the top level folder in your project.

这篇关于SDK的位置没有找到。与local.properties文件或者与ANDROID_HOME环境变量sdk.dir限定位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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