摇篮错误Android Studio中0.4.3 [英] Gradle error in Android Studio 0.4.3

查看:147
本文介绍了摇篮错误Android Studio中0.4.3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现这个参考使用旧版本,而不是最新的。我更新的Andr​​oid Studio来0.4.3并创建了一个新的项目。构建与下面立即失败:

I found references to this with an older version, but not the most recent. I updated Android Studio to 0.4.3 and created a new project. The build fails immediately with the below:

Could not create an instance of Tooling API implementation using the specified Gradle distribution 'http://services.gradle.org/distributions/gradle-1.10-all.zip'.: Could not create an instance of Tooling API implementation using the specified Gradle distribution 'http://services.gradle.org/distributions/gradle-1.10-all.zip'.
com.intellij.openapi.externalSystem.model.ExternalSystemException: Could not create an instance of Tooling API implementation using the specified Gradle distribution 'http://services.gradle.org/distributions/gradle-1.10-all.zip'.
    at org.jetbrains.plugins.gradle.service.project.GradleExecutionHelper.execute(GradleExecutionHelper.java:185)

我已经尝试安装JDK 1.7和JAVA我的家庭环境到(previously为1.6),但出现同样的错误。我GradleWrapper.properties是:

I have tried installing JDK 1.7 and setting my JAVA HOME to that (previously was 1.6) but the same error occurs. My GradleWrapper.properties is:

#Wed Apr 10 15:27:10 PDT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip

任何想法?

推荐答案

您需要确保你使用了Android摇篮插件的正确版本。 Android的工作室0.4.3它是0.8.4系列。在其指定的的build.gradle 为:

You need to make sure you're using the correct version of the Android Gradle plugin. For Android Studio 0.4.3 it's the 0.8.X series. Specify it in build.gradle as:

dependencies {
    classpath 'com.android.tools.build:gradle:0.8.+'
}

这可能是在顶级的的build.gradle 或一个模块中;在这里,我们把这个已经在Android的工作室更高版本的新创建的项目改变了位置。

This may be in the top-level build.gradle or the one in your module; the location where we put this has changed in projects newly created in later versions of Android Studio.

这篇关于摇篮错误Android Studio中0.4.3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆