gpt4 book ai didi

java - 错误 : Could not find com. android.tools.build :gradle:3. 5.2

转载 作者:行者123 更新时间:2023-12-02 01:12:34 26 4
gpt4 key购买 nike

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 要求者: 项目 : 打开文件

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 收到了这个错误我们使用了在线和离线模式,但它们不能正常工作这个错误让我很困惑

以下代码与包装器相关

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
}

最佳答案

这个问题基本上发生在您尝试加载旧项目时。据我所知,最好的解决方案是一一下载链接,项目正在显示并同步它。检查构建 Gradle 文件是否有任何过时的依赖项。看看你是否有

google()

在您的项目中存储库。确保您在依赖项中找到此行。

dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
}

关于java - 错误 : Could not find com. android.tools.build :gradle:3. 5.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59150797/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com