收到来自IntelliJ 13的投诉:
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发送垃圾邮件,但是仍然收到这个错误。怎么回事?
发布于 2014-08-15 05:57:55
local.properties
文件位于项目的根目录下,与gradlew
、gradlew.bat
、settings.gradle
和其他文件位于同一文件夹中。
此文件不应包含在源代码管理中。在(错误地)将其包含在源代码管理中,然后在本地删除该文件后,Android Studio自动为我重新创建了该文件。
以下是该文件的示例内容:
## 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安装位置的引用(在不同的机器上可能会有所不同)。
https://stackoverflow.com/questions/20673378
复制相似问题