gradle 2.0.0 beta 7缺失

时间:2016-03-22 06:58:34

标签: java android android-studio gradle

我一直收到这个错误。有任何想法吗?

What went wrong:
A problem occurred configuring project ':app'.
Could not resolve all dependencies for configuration ':app:classpath'.
Could not find com.android.tools.build:gradle:2.0.0-beta7.
Searched in the following locations:
https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.0.0-beta7/gradle-2.0.0-beta7.pom
https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.0.0-beta7/gradle-2.0.0-beta7.jar

1 个答案:

答案 0 :(得分:8)

你指的是maven central用于查找android插件工件,android gradle插件发布在jcenter

jcenter()添加到root build.gradle文件中的buildscript.repositories块。

它应如下所示:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

    buildscript {
        repositories {
            jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:X.X.X' // your verison

            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
        }
    }