解决Could not find com.android.tools.build:gradle:3.0.0
android studio升级3.0,gradle升级4.1以后项目报错,如下
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 ?Cstacktrace option to get the stack trace. Run with ?Cdebug 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() ..... } }
栏 目:Android代码
下一篇:Android在Sqlite3中的应用及多线程使用数据库的建议(实例代码)
本文标题:解决Could not find com.android.tools.build:gradle:3.0.0
本文地址:http://www.codeinn.net/misctech/209548.html