美文网首页
Could not find com.android.tools

Could not find com.android.tools

作者: fhclk | 来源:发表于2017-12-04 14:38 被阅读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()

.....

}

}

相关文章

网友评论

      本文标题:Could not find com.android.tools

      本文链接:https://www.haomeiwen.com/subject/nfkxixtx.html