摇篮错误:用摇篮分配无法执行编译 [英] Gradle error: could not execute build using gradle distribution
问题描述
在我更新的Android工作室到0.2.7版本,我得到了以下错误:
After I updated Android Studio to version 0.2.7, I got the following error:
org.gradle.tooling.GradleConnectionException:利用摇篮分布<无法执行共建href="http://services.gradle.org/distributions/gradle-1.6-bin.zip">http://services.gradle.org/distributions/gradle-1.6-bin.zip'.:使用摇篮分配无法执行构建<一href="http://services.gradle.org/distributions/gradle-1.6-bin.zip">http://services.gradle.org/distributions/gradle-1.6-bin.zip'.
org.gradle.tooling.GradleConnectionException: Could not execute build using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.6-bin.zip'.: Could not execute build using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.6-bin.zip'.
这是我build.gradle:
This is my build.gradle:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android'
dependencies {
compile files('libs/android-support-v4.jar')
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 10
targetSdkVersion 17
}
}
有谁知道这个错误? 在此先感谢!
Does anyone know this error? Thanks in advance!
推荐答案
我有同样的问题,不能说我知道是什么原因引起的,但我刚刚闭幕的Android工作室,更名为C:\用户\我的用户名\ .gradle目录老.gradle,然后重新推出Android工作室。 Android的工作室,然后重新创建的目录,并自动下载的摇篮zip文件,并设置了全面的总结。似乎所有被罚款,但说实话,我不知道是什么在这个目录中也没有什么问题的根本原因是要么,所以请谨慎和周围保留旧.gradle文件夹一点,直到你满意的所有是工作的罚款。
I had the same issue, can't say I know what caused it, but I just closed Android Studio, renamed the c: \ users \ MY USERNAME\ .gradle directory to old-.gradle and then re-launched Android Studio. Android studio then re-created the directory and automatically downloaded the gradle zip file and set it all up. Seems to all be fine but to be honest I don't know what this directory is nor what the root cause of the problem was either, so proceed with caution and keep the old .gradle folder around for a bit until you're happy all is working fine.
这篇关于摇篮错误:用摇篮分配无法执行编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!