Android jcenter bad gateway 502(Unable to load Maven meta-data from https://jcenter.bintray.com)

今天在Android studio运行项目的时候报了如下错误,项目都编译不过了,顿时慌。。。

这里附上gradle额下载地址(gradle)

Error:Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not resolve com.tencent.bugly:nativecrashreport:latest.release.
  Required by:
      project :app
   > Could not resolve com.tencent.bugly:nativecrashreport:latest.release.
      > Failed to list versions for com.tencent.bugly:nativecrashreport.
         > Unable to load Maven meta-data from https://jcenter.bintray.com/com/tencent/bugly/nativecrashreport/maven-metadata.xml.
            > Could not HEAD 'https://jcenter.bintray.com/com/tencent/bugly/nativecrashreport/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
   > Could not resolve com.tencent.bugly:nativecrashreport:latest.release.
      > Failed to list versions for com.tencent.bugly:nativecrashreport.
         > Unable to load Maven meta-data from https://dl.bintray.com/jetbrains/anko/com/tencent/bugly/nativecrashreport/maven-metadata.xml.
            > Could not get resource 'https://dl.bintray.com/jetbrains/anko/com/tencent/bugly/nativecrashreport/maven-metadata.xml'.
               > Could not GET 'https://dl.bintray.com/jetbrains/anko/com/tencent/bugly/nativecrashreport/maven-metadata.xml'. Received status code 502 from server: Bad Gateway

直接访问错误信息中的地址,

 直接访问错误信息中的地址,502错误,如下

咨询了一下万能的群友(好多群都有这个问题),得到如下解决方案,照做之后就ok:

 注释掉jcenter,替换成maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }

allprojects {
    repositories {
        google()
//        jcenter()
//        maven {url 'https://dl.bintray.com/jetbrains/anko'} 
        maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }//解决以下下问题(jcenter bad gateway 502)

//        Error:Could not resolve all files for configuration ':app:debugCompileClasspath'.
//                > Could not resolve com.tencent.bugly:nativecrashreport:latest.release.
//                Required by:
//                project :app
//        > Could not resolve com.tencent.bugly:nativecrashreport:latest.release.
//                > Failed to list versions for com.tencent.bugly:nativecrashreport.
//                > Unable to load Maven meta-data from https://jcenter.bintray.com/com/tencent/bugly/nativecrashreport/maven-metadata.xml.
//        > Could not HEAD 'https://jcenter.bintray.com/com/tencent/bugly/nativecrashreport/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
//        > Could not resolve com.tencent.bugly:nativecrashreport:latest.release.
//                > Failed to list versions for com.tencent.bugly:nativecrashreport.
//                > Unable to load Maven meta-data from https://dl.bintray.com/jetbrains/anko/com/tencent/bugly/nativecrashreport/maven-metadata.xml.
//        > Could not get resource 'https://dl.bintray.com/jetbrains/anko/com/tencent/bugly/nativecrashreport/maven-metadata.xml'.
//        > Could not GET 'https://dl.bintray.com/jetbrains/anko/com/tencent/bugly/nativecrashreport/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
    }

感谢万能的群友!希望你遇到这种情况的时候能快速找到解决方案!

  • 3
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值