解决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 –stacktrace option to get the stack trace. Run with –debug 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()
.....
}
}
到此这篇关于解决Could not find com.android.tools.build:gradle:3.0.0的文章就介绍到这了,更多相关Could not find gradle:3.0.0内容请搜索脚本之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持脚本之家!
相关文章
Android编程实现webview将网页打包成apk的方法
这篇文章主要介绍了Android编程实现webview将网页打包成apk的方法,以打包HTML5为例分析了webview打包apk的相关方法、属性与事件操作技巧,需要的朋友可以参考下2017-08-08
Android自定义View实现搜索框(SearchView)功能
这篇文章主要为大家详细介绍了Android自定义View实现搜索框SearchView功能,具有一定的参考价值,感兴趣的小伙伴们可以参考一下2017-11-11


最新评论