解决以下错误几乎浪费了我的一天。无法获得任何线索。
org.gradle.api.UncheckedIOException: Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.3/gradle-3.1.3.pom'. Received status code 500 from server: Internal Server Error
我在gradle-wrapper.properties中使用distributionUrl = https://services.gradle.org/distributions/gradle-4.1-all.zip
我可以手动在同一网络上下载此文件,但是在Andriod Studio中,我遇到了以上错误,并且同步失败。
我的顶级构建文件
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
}
dependencies {
classpath "com.android.tools.build:gradle:3.1.3"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
}
}
任何帮助
最佳答案
打开“gradle.properties”,然后从中删除代理设置行。再次构建项目。
关于android - Android Studio Gradle sync说无法下载gradle-3.1.3.pom,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51767337/