Android studio 梯度同步误差
我是Android新手,在studio2.2测试版中工作。 我的build.gradle文件包含以下内容Android studio 梯度同步误差,android-studio,gradle,Android Studio,Gradle,我是Android新手,在studio2.2测试版中工作。 我的build.gradle文件包含以下内容 // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'c
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.gradle:2.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven {url 'http://repo1.maven.org/maven2'}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
但在同步时,它会产生以下错误
Error:Could not find com.android.tools.gradle:2.0.0:.
Searched in the following locations:
file:/D:/android-studio/gradle/m2repository/com/android/tools/gradle/2.0.0//2.0.0-.pom
file:/D:/android-studio/gradle/m2repository/com/android/tools/gradle/2.0.0//2.0.0-.jar
https://jcenter.bintray.com/com/android/tools/gradle/2.0.0//2.0.0-.pom
https://jcenter.bintray.com/com/android/tools/gradle/2.0.0//2.0.0-.jar
Required by:
:MyApplication:unspecified
有什么帮助吗?当前android gradle工具版本是适用于android studio的
2.2.0
。此外,您现在可以使用稳定版本,无需测试版
classpath 'com.android.tools.gradle:2.2.0'
您还需要gradle
2.14.1+
用于此插件。当前的android gradle工具版本是android studio的2.2.0
。此外,您现在可以使用稳定版本,无需测试版
classpath 'com.android.tools.gradle:2.2.0'
您还需要gradle2.14.1+
,才能使用此插件。尝试:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
试试看:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
如果你是新手,为什么要使用测试版?我应该使用什么版本@如果你是新手,为什么要使用测试版?我应该使用什么版本@巴特里克