Could not find com.android.tools.build:gradle:4.0.1.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.0.1/gradle-4.0.1.pom
- https://jcenter.bintray.com/com/android/tools/build/gradle/4.0.1/gradle-4.0.1.pom
Required by:
project :
Open File
那就是错误日志。我搜索在很多网站和我的一切是添加google()
在build.gradle
文件巫机器人工作室已经做到了。
我也尝试mavenCentral()
过,但该错误仍然存在。我安装了AS 3.1,然后将其升级到了最新的稳定版本4.0.1。
build.gradle文件
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.0.1"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
编辑:我可以https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.0.1/gradle-4.0.1.pom
手动下载,但是谁知道在哪里复制和粘贴它?
我几天都遇到同样的问题,昨天我解决了。在这里检查我的答案:找不到com.android.tools.build:gradle:4.0.1 OR 4.0.0或任何版本
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句