Could not find com.android.tools.build:gradle:3.0.0.

* What went wrong:
A problem occurred configuring root project ‘android’.
> Could not resolve all files for configuration ‘:classpath’.
   > Could not resolve com.android.tools.build:gradle:3.0.0.
     Required by:
         project :
      > Could not resolve com.android.tools.build:gradle:3.0.0.
         > Could not get resource ‘https://maven.google.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom’.
            > Could not GET ‘https://maven.google.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom’.
               > Remote host closed connection during handshake

解决方法:在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()

…..

}

}

    原文作者:fhclk
    原文地址: https://www.jianshu.com/p/4bc982d695a3
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞