Could not resolve all files for configuration ':classpath'.Could not find com.android.tools.

来源:互联网 发布:如何退出淘宝客 编辑:程序博客网 时间:2024/04/29 06:15

升级到Android Sutido 3.0后,跑测之前的Model的main()方法方法时报错:

Error:Gradle: A problem occurred configuring root project 'MyApplication'.> Could not resolve all files for configuration ':classpath'.   > Could not find com.android.tools.build:gradle:3.0.0.     Searched in the following locations:         https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom         https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.jar     Required by:         project :

解决:
修改Project的build.gradle(注意:不是App的build.gradle),两处加上google()

buildscript {    repositories {        jcenter()        google()    }    dependencies {        classpath 'com.android.tools.build:gradle:3.0.0'    }}allprojects {    repositories {        jcenter()        google()    }}task clean(type: Delete) {    delete rootProject.buildDir}
阅读全文
0 0
原创粉丝点击