Home > Net >  Flutter exception Could not resolve com.google.android.gms:play-services-location:16.
Flutter exception Could not resolve com.google.android.gms:play-services-location:16.

Time:12-09

guys

In trying to emulate the application now, the terminal throws an exception and the application won't start:

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'.
> Could not resolve all task dependencies 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

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 37s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

Flutter doctor result:

[√] Flutter (Channel stable, 1.22.5, on Microsoft Windows [versão 10.0.19041.1348], locale pt-BR)
 
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[√] Android Studio (version 3.6)
[√] Connected device (1 available)

I've already tried replacing "jcenter" in * project / android / build.gradle * passing * mavenCentral * in place as follows, as reported here and here, but that didn't fix the problem

repositories {
    google()
    mavenCentral()
    maven {
        url "https://maven.google.com"
    }
}

I emphasize that the project was working normally and this occurred at this time.

I request the kindness of an assistance to solve.

CodePudding user response:

I got the same problem. looks like the google location service issue. Does anyone have any way to walk around?

CodePudding user response:

i have same issue, when turn off wifi run normally

CodePudding user response:

In Your App->BuildGradle Add

apply plugin: 'com.google.gms.google-services'
  • Related