Android 解决Could not find com.android.tools.build:gradle

来源:互联网 发布:mac搜索文件不好用 编辑:程序博客网 时间:2024/05/22 14:43

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

Error:Could not find com.android.tools.build:gradle:2.2.2.Searched in the following locations:    https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.pom    https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.jarRequired by:    :ListViewAnimations-master:unspecified

在项目的根目录的build.gradle文件中的buildscript->repositories节点下添加jcenter(),然后更新依赖。

buildscript {    repositories {        jcenter()        mavenCentral()    }    dependencies {        classpath 'com.android.tools.build:gradle:2.2.2'    }}allprojects {    repositories {        jcenter()        mavenCentral()    }}
阅读全文
0 0
原创粉丝点击