close

[Solved] Could not GET ‘https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml’. Received status code 502 from server: Bad Gateway

Hello Guys, How are you all? Hope You all Are Fine. Today I am just trying to run my flutter project And I am facing following error Could not GET ‘https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml’. Received status code 502 from server: Bad Gateway in Flutter. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How This Error Occurs ?

I am just trying to run my flutter project And I am facing following error.

Could not resolve all files for configuration ‘:app:debugRuntimeClasspath’. Could not resolve com.google.android.gms:play-services-location:16.+. Required by: project :app > project :location > Failed to list versions for com.google.android.gms:play-services-location. > Unable to load Maven meta-data from https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml. > Could not get resource ‘https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml’. > Could not GET ‘https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml’. Received status code 502 from server: Bad Gateway

How To Solve Could not GET ‘https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml’. Received status code 502 from server: Bad Gateway Error ?

  1. How To Solve Could not GET 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml'. Received status code 502 from server: Bad Gateway Error ?

    To Solve Could not GET 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml'. Received status code 502 from server: Bad Gateway Error Just update all plugins to theirs latest version. In my case I fixed the build just by removing the old pubspec.lock file and updating the firebase_messaging from ^9.1.4 to ^11.1.0. Now, just run your app and problem must be solved.

  2. Could not GET 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml'. Received status code 502 from server: Bad Gateway

    To Solve Could not GET 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml'. Received status code 502 from server: Bad Gateway Error Just update all plugins to theirs latest version. In my case I fixed the build just by removing the old pubspec.lock file and updating the firebase_messaging from ^9.1.4 to ^11.1.0. Now, just run your app and problem must be solved.

Solution 1: Temporary issue

This should be temporary issue cause of these libraries is down so that just check if you are facing status code 502 from server: Bad Gateway for any library ? that cause of this error.

Solution 2: Update all Plugin

Second solution is Just update all plugins to theirs latest version. In my case I fixed the build just by removing the old pubspec.lock file and updating the firebase_messaging from ^9.1.4 to ^11.1.0. Now, just run your app and problem must be solved.

Solution 3: Replace all “jcenter()” words with “mavenCentral()”

  1. First of all You need to open project level build.gradle file at android/build.gradle.
  2. Then, Replace all jcenter() words with mavenCentral() word and save it.
  3. Now, you have to open android folder within your flutter project in Android Studio.
  4. Then wait for Android Studio to re-download all library packages, it may take upto 15 minutes.
  5. Now, just Tap on “Run” project button which looks like green play button in top and wait for project to get build.
  6. Once all library packages are downloaded then you can run your project.
  7. Now, your error must be solved.

Summary

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

Leave a Comment