[英]Android Studio Could not find com.android.tools.build:gradle:4.0.1. Error
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
that is the error log.那是错误日志。 I searched in many websites and all I got was to add
google()
in build.gradle
file witch android studio has already done it.我在很多网站上搜索,我得到的只是在
build.gradle
文件中添加google()
android studio 已经完成了。
I tried mavenCentral()
too but that error still exist.我也尝试
mavenCentral()
但该错误仍然存在。 I installed AS 3.1 then I upgraded it to 4.0.1 which is the latest stable version.我安装了 AS 3.1 然后升级到 4.0.1 这是最新的稳定版本。
the build.gradle file 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
}
Edited: I can download https://dl.google.com/dl/android/maven2/com/android/tools/build.gradle/4.0.1/gradle-4.0.1.pom
manually but anyone knows where to copy and paste it?编辑:我可以手动下载
https://dl.google.com/dl/android/maven2/com/android/tools/build.gradle/4.0.1/gradle-4.0.1.pom
但任何人都知道在哪里复制和粘贴吗?
I had the same problem for days and i solved that yesterday.几天来我遇到了同样的问题,昨天我解决了。 check my answer here: Could not find com.android.tools.build.gradle:4.0.1 OR 4.0.0 OR any versions
在这里查看我的答案: 找不到 com.android.tools.build.gradle:4.0.1 或 4.0.0 或任何版本
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.