gpt4 book ai didi

java - 无法获取 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.0.1/gradle-4.0.1.pom'

转载 作者:行者123 更新时间:2023-12-03 05:20:20 28 4
gpt4 key购买 nike

更新 Gradle 后出现以下问题。我找不到任何解决方案。所以请帮我解决以下问题。提前致谢...

(问题 ----- 无法获取“https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.0.1/gradle-4.0.1。 pom'。从服务器收到状态代码 406: Not Acceptable )

我的 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
}

最佳答案

你应该设置build.gradle(项目级别)

classpath 'com.android.tools.build:gradle:4.0.1'

gradle-wrapper.properties 文件中

distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

然后再次同步项目。

关于java - 无法获取 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.0.1/gradle-4.0.1.pom',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63785967/

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