Android Studio:Gradle 同步失败:无法 HEAD '...'.从

Android Studio: Gradle sync failed: Could not HEAD #39;...#39;. Received status code 502 from server: Bad Gateway(Android Studio:Gradle 同步失败:无法 HEAD ....从服务器收到状态码 502:Bad Gateway)

本文介绍了Android Studio:Gradle 同步失败:无法 HEAD '...'.从服务器收到状态码 502:Bad Gateway的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的项目中将 Android Studio 更新到最新版本 (3.1) 和 gradle 版本后,我收到一个错误(链接总是不同):

After update Android Studio to latest version (3.1) and gradle version in my project I get an error (the link is always different):

12:54   Gradle sync started

12:56   Gradle sync failed: Could not HEAD 'https://jcenter.bintray.com/com/android/tools/analytics-library/shared/26.1.0/shared-26.1.0.jar'. Received status code 502 from server: Bad Gateway             Consult IDE log for more details (Help | Show Log) (1m 56s 602ms)

12:56   Gradle sync started

12:57   Gradle sync failed: Could not HEAD 'https://jcenter.bintray.com/org/codehaus/mojo/animal-sniffer-parent/1.14/animal-sniffer-parent-1.14.pom'. Received status code 502 from server: Bad Gateway             Consult IDE log for more details (Help | Show Log) (1m 4s 266ms)

12:58   Gradle sync started

12:59   Gradle sync failed: Could not HEAD 'https://jcenter.bintray.com/com/sun/activation/all/1.2.0/all-1.2.0.pom'. Received status code 502 from server: Bad Gateway          Consult IDE log for more details (Help | Show Log) (1m 29s 985ms)

13:01   Gradle sync started

13:02   Gradle sync failed: Could not HEAD 'https://jcenter.bintray.com/com/sun/activation/javax.activation/1.2.0/javax.activation-1.2.0.pom'. Received status code 502 from server: Bad Gateway            Consult IDE log for more details (Help | Show Log) (4s 976ms)

Android Studio 版本:

Android Studio version:

Android Studio 3.1
Build #AI-173.4670197, built on March 22, 2018
JRE: 1.8.0_152-release-1024-b02 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

我已经尝试过干净的重建和更新 gradle,重新启动 Android Studio 和 PC,但没有成功.有什么想法吗?

I already tried clean rebuild and update gradle, restart Android Studio and PC, but without success. Any ideas?

PS:我当然有互联网.此外,如果您在浏览器中打开链接 - 文件会被下载.

PS: of course I have internet. Also, if you open a link in the browser - the file is downloaded.

推荐答案

jcenter目前有问题,请查看http://status.bintray.com/

jcenter is having issues at the moment, please check http://status.bintray.com/

这篇关于Android Studio:Gradle 同步失败:无法 HEAD '...'.从服务器收到状态码 502:Bad Gateway的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:Android Studio:Gradle 同步失败:无法 HEAD '...'.从

基础教程推荐