2014-10-06 66 views
0

我试图在GenyMotion模拟器上运行我的项目,出于某种原因,我不断收到此错误,有谁知道为什么?之前它工作正常。模拟器上的Android错误启动项目

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

在你的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() 
    } 
}