我一直收到这个错误。有任何想法吗?
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
最佳答案
您指的是用于查找 android 插件 Artifact 的 maven central,android gradle 插件发布于 jcenter
将 jcenter()
添加到根 build.gradle 文件中的 buildscript.repositories block 中。
它应该如下所示:
// 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
}
}
关于java - 缺少 gradle 2.0.0 beta 7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36147982/