今天拉同事最新的代码,编译时老是报如下错误:
Error:Could not find com.android.tools.build:gradle:2.2.0.
Searched in the following locations:
file:/D:/software/android-studio/gradle/m2repository/com/android/tools/build/gradle/2.2.0/gradle-2.2.0.pom
file:/D:/software/android-studio/gradle/m2repository/com/android/tools/build/gradle/2.2.0/gradle-2.2.0.jar
https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.0/gradle-2.2.0.pom
https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.0/gradle-2.2.0.jar
跑到maven.org网站上查看,从2.1.3就没有更新了,shit!
百度上都说把版本降回到2.1.3,这不扯蛋么,难道你以后都准备只用2.1.3了?最后还是发现找到脚本,添加jcenter库进去,就可以从jcenter里下载了
解决 Could not find com.android.tools.build:gradle 问题
原文:http://www.cnblogs.com/Rocky_/p/6202890.html