首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >安卓项目的local.properties走向何方?

安卓项目的local.properties走向何方?
EN

Stack Overflow用户
提问于 2013-12-19 12:18:41
回答 1查看 93K关注 0票数 48

收到来自IntelliJ 13的投诉:

代码语言:javascript
复制
8:15:48 PM Gradle '<project>' project refresh failed:
           SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
           Build file '/<project>/build.gradle' line: 20
           : Gradle settings

我已经尝试在我能想到的每一个目录中对我的local.properties发送垃圾邮件,但是仍然收到这个错误。怎么回事?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-08-15 05:57:55

local.properties文件位于项目的根目录下,与gradlewgradlew.batsettings.gradle和其他文件位于同一文件夹中。

此文件不应包含在源代码管理中。在(错误地)将其包含在源代码管理中,然后在本地删除该文件后,Android Studio自动为我重新创建了该文件。

以下是该文件的示例内容:

代码语言:javascript
复制
## This file is automatically generated by Android Studio.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Thu Aug 14 14:49:26 PDT 2014
sdk.dir=C\:\\Program Files (x86)\\Android\\android-studio\\sdk

注意sdk.dir=对Android Studio SDK安装位置的引用(在不同的机器上可能会有所不同)。

票数 71
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20673378

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档