我试图在GenyMotion模拟器上运行我的项目,由于某些原因我不断收到此错误,有人知道为什么吗?之前工作正常。
Error:A problem occurred configuring root project 'Desktop2'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:0.12.+.
Required by:
:Desktop2:unspecified
> Failed to list versions for com.android.tools.build:gradle.
> Could not list versions using M2 pattern 'http://jcenter.bintray.com/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]'.
> Could not GET 'http://jcenter.bintray.com/com/android/tools/build/gradle/'.
> jcenter.bintray.com
答案 0 :(得分:0)
在build.gradle文件中(外部文件,至少应该有2个)更改
classpath 'com.android.tools.build:gradle:0.12.+'
至
classpath 'com.android.tools.build:gradle:0.12.2'
如果没有帮助,请尝试更改存储库部分
这是我的整个build.gradle文件
// 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:0.12.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}