错误:找不到 com.android.tools.build:gradle:3.5.2 [英] ERROR: Could not find com.android.tools.build:gradle:3.5.2
问题描述
ERROR: Could not find com.android.tools.build:gradle:3.5.2.
Searched in the following locations:
-
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.2/gradle-3.5.2.pom-
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.2/gradle-3.5.2.jar- https://jcenter.bintray.com/com/android/tools/build/gradle/3.5.2/gradle-3.5.2.pom- https://jcenter.bintray.com/com/android/tools/build/gradle/3.5.2/gradle-3.5.2.jar要求:项目 :打开文件
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.2/gradle-3.5.2.jar - https://jcenter.bintray.com/com/android/tools/build/gradle/3.5.2/gradle-3.5.2.pom - https://jcenter.bintray.com/com/android/tools/build/gradle/3.5.2/gradle-3.5.2.jar Required by: project : Open File
ext {
var = '3.5.2'
var1 = '3.5.2'
}// 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:3.5.2'
// 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
}
我们在运行我的项目时从我的 android studio 收到这个错误我们使用了在线和离线模式,但它们无法正常工作这个错误让我很困惑
we recived this error from my android studio when run my projects we used online and offline mod but they not worked corectly This error has confused me
以下代码与wrapper相关
The following code is related to wrapper
ext {
var = '3.5.2'
var1 = '3.5.2'
}// 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:3.5.2'
// 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
}
推荐答案
我在 Linux (ubuntu) 上也遇到过这个问题
I also had this problem on Linux (ubuntu)
我尝试了不同的方法,但问题仍然没有解决.
I tried different ways but the problem still didn't work out.
最后,我删除 /home/(user)/.gradle
目录并重新启动 Android Studio 并修复了此错误.
Finally, I remove /home/(user)/.gradle
directory and restart Android Studio and this error fixed.
这篇关于错误:找不到 com.android.tools.build:gradle:3.5.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!