android studio升级3.0,gradle升级项目报错

来源:互联网 发布:手机淘宝怎么改号码 编辑:程序博客网 时间:2024/06/05 00:26

错误如下:

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 :* Try: 
Run with –stacktrace option to get the stack trace. Run with –debug option to get more log output.


解决方法:在project的builde.gradle做如下操作分别加上google()

buildscript {repositories {    google()    ....}dependencies {    classpath 'com.android.tools.build:gradle:3.0.0'    // NOTE: Do not place your application dependencies here; they belong    // in the individual module build.gradle files}}allprojects {    repositories {        google()        .....    }}
阅读全文
0 0
原创粉丝点击