[英]Gradle location is incorrect error while importing ActionBarsherlock in Android Studio
I'm also trying to import the ABS in new updated Android Studio. 我也试图在新的更新的Android Studio中导入ABS。 I'm following this tutorial. 我正在学习本教程。
but on step Adding Action Bar Sherlock library to Android Studio im getting the error 但是在步骤中添加Action Bar Sherlock库到Android Studio即可获得错误
Gradle Location is incorrect. Gradle位置不正确。 here is pic. 这是照片。
When I go to the path C:\\Users\\Sir John Qadir\\
there is no any gradle1.6 folder in there. 当我去路径C:\\Users\\Sir John Qadir\\
那里没有任何gradle1.6文件夹。 How to resolve this? 怎么解决这个?
如果您已经使用brew安装了gradle,那么它将是:
/usr/local/Cellar/gradle/<version>/libexec/
Try using this path: 尝试使用此路径:
For Windows 对于Windows
C:\Users\MyHome\.gradle\wrapper\dists\gradle-1.6-bin\<some random folder>\gradle-1.6
For UNIX (Debian, Mac etc.) 对于UNIX(Debian,Mac等)
~/.gradle/wrapper/dists/gradle-<a-version>-<bin or all>/<some random folder>/gradle-<a-version>
Point to the folder <gradle root folder>/libexec
. 指向文件夹<gradle root folder>/libexec
。 Things should start working. 事情应该开始奏效了。
When using homebrew, instead of (as suggested in other answers): 使用自制软件时,而不是(如其他答案所示):
/usr/local/Cellar/gradle/<version>/libexec/
It's better to use: 最好使用:
/usr/local/opt/gradle/libexec
It's a symlink and will survive brew upgrade
. 这是一个符号链接,将在brew upgrade
。
Create a build.gradle with: 使用以下命令创建build.gradle:
task getHomeDir << {
println gradle.gradleHomeDir
}
Then run it with: 然后运行它:
gradle getHomeDir
You should see something like: 你应该看到类似的东西:
/usr/local/Cellar/gradle/1.6/libexec
You can use that to populate the Gradle plugin, and you're off. 您可以使用它来填充Gradle插件,然后就可以了。
http://www.rabblemedia.net/blog/setting-up-gradle-plugin-for-intellij/ http://www.rabblemedia.net/blog/setting-up-gradle-plugin-for-intellij/
如果你使用brew在mac上安装gradle,那么使用/usr/local/Cellar/gradle/4.0.1/libexec
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.