【问题标题】:502 google.bintray.com Bad Gateway502 google.bintray.com 网关错误
【发布时间】:2022-01-07 17:12:28
【问题描述】:

我已经开始在我的android项目中构建Gradle,但是我遇到了以下问题,有人知道会发生什么吗?

我正在尝试从 Maven 获取 Tflite 依赖项,直到今天才出现问题。

Could not determine the dependencies of task ':app:processDebugResources'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve org.tensorflow:tensorflow-lite:+.
     Required by:
         project :app > project :tflite
      > Failed to list versions for org.tensorflow:tensorflow-lite.
         > Unable to load Maven meta-data from https://google.bintray.com/exoplayer/org/tensorflow/tensorflow-lite/maven-metadata.xml.
            > Could not get resource 'https://google.bintray.com/exoplayer/org/tensorflow/tensorflow-lite/maven-metadata.xml'.
               > Could not GET 'https://google.bintray.com/exoplayer/org/tensorflow/tensorflow-lite/maven-metadata.xml'. Received status code 502 from server: Bad Gateway

【问题讨论】:

  • 我的团队在从 Bintray 中提取依赖项时也遇到了问题,我看到 JFrog 的一些博客文章说他们将关闭 Bintray。相关博文在这里jfrog.com/blog/…我会在找到解决方案时更新,即要迁移到的另一个存储库。
  • @JakeSchnorr 更新我的问题,试试这个my question
  • 我认为这里适当的长期解决方案是简单地从任何 JFrog 存储库中迁移出来,因为它们变得不可靠,即使他们承诺“保持只读”。

标签: android maven gradle


【解决方案1】:

过去两天我们也遇到了同样的情况。看起来它又开始工作了。

【讨论】:

【解决方案2】:

在解决此类问题 3 天后

我通过编辑项目 buildgradle 解决了这个问题 [应用程序名称]/build.gradle 如下

    repositories {
        google()
    //commit this: maven
       //maven() 
    // add this
        mavenCentral() 
    }

allprojects {
    repositories {
        google()
    //commit this: maven
       //maven() 
    // add this
        mavenCentral() 
    }
}

奖金: 我对同一个库有同样的问题,所以也许你需要在同一个 build.gradle 文件上进行这个设置 Kotlin 版本:

        ext.kotlin_version = '1.5.0'

依赖:

        classpath 'com.android.tools.build:gradle:4.2.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

【讨论】:

    【解决方案3】:

    对于 JCenter / Bintray 仍有问题的用户,您可以切换到 JitPack。

    您需要做的就是在 https://jitpack.io 中搜索您选择的 GitHub 项目,然后将提供的代码复制粘贴到您的 build.gradle 文件中。

    【讨论】:

    【解决方案4】:

    注释 jcenter() 并添加 mavenCentral()

     repositories {
           jcenter()
            mavenCentral()
            google()
        }
    

    【讨论】:

      猜你喜欢
      • 2017-03-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-21
      • 2011-05-14
      • 2016-07-04
      • 2019-06-05
      • 2013-06-23
      相关资源
      最近更新 更多