从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,但仍然得到这个错误。 是什么赋予了?

Solutions Collecting From Web of "local.properties去Android项目?"


该文件不应该包含在源代码pipe理中。 在源代码pipe理中包含这个(不正确)之后,然后在本地删除文件后,Android Studio会自动为我重新创build文件。


 ## 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安装的位置(在不同的机器上可能不同)。