Android Studio: Gradle sync failed: Could not HEAD '...'. Received status code 502 from server: Bad Gateway
jcenter is having issues at the moment, please check http://status.bintray.com/
EDIT: it looks like the link above was sunset, new link at: https://status.gradle.com/
jcenter.bintray.com is down Error: 502 Bad Gateway
It's a global outage in JCenter. You can monitor status at https://status.gradle.com. It replaces the bintray status page which seems is now fully sunset and returns a 502 error.
UPDATE Jan 13, 06:35 UTC
JCenter is now back online, and systems are fully operational.
UPDATE Jan 20
Gradle Plugin resolution outage postmortem
https://blog.gradle.org/plugins-jcenter
Following this incident, the Gradle Plugin Portal now uses a JCenter mirror hosted by Gradle instead of JCenter directly. This should shield users from short JCenter outages for libraries that have been cached by the mirror. We saw another short outage of JCenter over the weekend and this did not appear to impact Gradle Plugin Portal users.
Android Studio update 3.1 start getting 502 Gate way gradle dependecies error
Problem is because bintray is down: http://status.bintray.com
Try this: https://stackoverflow.com/a/49510333/1607169
React Native: Android Received status code 502 from server: Bad Gateway from JCenter and Bintray being discontinued
it's a global outage in JCenter. You can monitor status here https://status.gradle.com it replaces bintray status page which seems is now fully sunset and returns 502 error.
UPDATE Jan 13, 06:35 UTC
JCenter is now back online, systems are fully operational.
Could not GET 'play-services-location/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
The problem is that a plugin (location
in this case) didn't specify a fixed version of an Android library. So in order to find which versions are available, Gradle must go to the repository to check. In this case, that repository is Bintray
, which has been down for days and returning HTTP 502 Bad Request
.
The steps below provide a quick and dirty workaround so you can build the app while Bintray is down. A more proper solution would be to fork the plugin and make changes to your fork as suggested by Eldar Miensutov, but it might be a bit overkill for a temporary server error.
- In the Project tool window (where your files are listed), scroll all the way down until you find
Flutter Plugins
. If you don't see it, make sure thatProject
is selected in the dropdown at the top of the Project tool window. - Open
Flutter plugins
, findlocation-4.0.0
and open it (you might have a different version number afterlocation-
, that's fine). - Open the file
location-4.0.0/android/build.gradle
- Find the line
api 'com.google.android.gms:play-services-location:16.+'
- Change it to
api 'com.google.android.gms:play-services-location:16.0.0'
. If your editor says that the file does not belong to your project, select"I want to edit this file anyway"
.
You should now be able to build the app.
This change is of course a temporary solution, and if you update the location
plugin your changes will be overwritten. But at least you'll be able to build until Bintray comes online again (or until you had time to migrate to another more recently updated plugin).
OR
In case the problem is caused by the location plugin and you are able to update to the latest version of it (4.3.0
at the moment), that also seems to resolve the problem. In my case, I was stuck on an old version of Flutter and location
because of some other packages that weren't compatible with Flutter 2.
Gradle sync failed: my project after update my Android studio from 3.0.1 to 3.1.0
The problem is on the jcenter side, see http://status.bintray.com
Intermittent download failures
Identified - There is an intermittent download failures due to an issue with CDN provider. CDN provider is investigating the issue.
Mar 17, 21:29 UTC
jcenter 502 bad gateway after gradle refresh
Bin tray is experiencing "intermittent issues" on their download network : https://status.bintray.com/
Related Topics
Snappy Scrolling in Recyclerview
Solving "Adb Server Version Doesn't Match This Client" Error
Put and Get String Array from Shared Preferences
Appcompatv7 - V21 Navigation Drawer Not Showing Hamburger Icon
Programmatically Collapse or Expand Collapsingtoolbarlayout
Convert Arraylist<Mycustomclass> to JSONarray
How to Simulate Touch from Background Service with Sendevent or Other Way
Using Resultreceiver in Android
How to Detect Whether the Android Phone in Silent Mode Programmatically
Show Icon in Actionbar/Toolbar with Appcompat-V7 21
How to Re-Sign an .Apk with a Different Certificate Than What It Came With
Android SQLite How to Check If a Record Exists
How to Solve the Install_Failed_Dexopt Error
How to Display Icons in a Popupmenu
Linkedlist Put into Intent Extra Gets Recast to Arraylist When Retrieving in Next Activity