본문 바로가기
프로그래밍/Flutter & Dart

[Flutter] Android Emulator error

by 소꿍 2022. 3. 23.

에러 메시지

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> 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

* 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 6m 6s
[!] Gradle threw an error while downloading artifacts from the network. Retrying to download...

 

/Users/${user}/development/flutter/.pub-cache/hosted/pub.dartlang.org/location-4.3.0/android/build.gradle
build.grdle의 dependencies -> api 부분 수정(https://stackoverflow.com/questions/70166663/could-not-get-play-services-location-maven-metadata-xml-received-status-code/70319873#70319873)
original
api 'com.google.android.gms:play-services-location:16.+'
-> com.google.android.gms:play-services-location:19.0.1 로 변경했는데 안 되다가 갑자기 됨(?..) (21/3/23 기준)

 

19.0.1의 출처

https://developers.google.com/android/guides/setup

 

 

- android emulator v3(https://github.com/google/android-emulator-m1-preview/releases/tag/0.3)에 google play 넣기

-> 관련 이슈 깃허브 https://github.com/google/android-emulator-m1-preview/issues/1

https://dev-repository.tistory.com/97

 

M1 맥 안드로이드 에뮬레이터에서 구글 플레이 사용하기

 현재 arm 기반의 M1 맥은 녹스나 블루스택 같은 안드로이드 에뮬레이터를 사용할 수 없다. 안드로이드 앱 개발을 할 때 사용하는 구글에서 제공하는 안드로이드 에뮬레이터도 정식 버전은 없고

dev-repository.tistory.com

 

 

댓글