【问题标题】:Android Studio Gradle sync says not able to download gradle-3.1.3.pomAndroid Studio Gradle 同步说无法下载 gradle-3.1.3.pom
【发布时间】:2018-08-09 12:41:01
【问题描述】:

几乎浪费了我一天的时间来解决以下错误。无法获得任何潜在客户。

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()
    }
}

感谢任何帮助

【问题讨论】:

  • 试试这个类路径“com.android.tools.build:gradle:3.0.0”
  • 无法获取“dl.google.com/dl/android/maven2/com/android/tools/build/gradle/…”。从服务器收到状态码 500:内部服务器错误相同的错误...
  • 如果你使用的android studio低于版本3,那么你需要在repository tag maven { url "maven.google.com" } 中添加这一行并删除google()
  • 我使用的是 Android Studio 3.1.4。仍然面临同样的问题。

标签: android android-studio gradle android-gradle-plugin build.gradle


【解决方案1】:

打开“gradle.properties”,然后从中删除代理设置行。再次构建项目。

【讨论】:

    猜你喜欢
    • 2018-12-06
    • 1970-01-01
    • 2019-03-07
    • 2018-11-27
    • 2019-03-15
    • 2020-11-08
    • 2018-12-07
    • 1970-01-01
    • 2023-04-05
    相关资源
    最近更新 更多