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

플러터 Tip : flutter debug 패키지 resolve 실패 (안드로이드)

by drogrammer 2021. 3. 16.
반응형

1. 문제 상황

플러터 프로젝트 생성하자마자 안드로이드 빌드를 수행하니 아래와 같은 에러가 발생했다.

플러터 2.0 업그레이드 후 프로젝트를 처음 생성한 상황이라, gradle 설정 등이 이전과 다른 상황이라 발새하는 것으로 추정된다.

Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve io.flutter:x86_debug:1.0.0-40441def692f444660a11e20fac37af9050245ab.
     Required by:
         project :app
      > Could not resolve io.flutter:x86_debug:1.0.0-40441def692f444660a11e20fac37af9050245ab.
         > Could not get resource 'https://jcenter.bintray.com/io/flutter/x86_debug/1.0.0-40441def692f444660a11e20fac37af9050245ab/x86_debug-1.0.0-40441def692f444660a11e20fac37af9050245ab.pom'.
            > Could not HEAD 'https://jcenter.bintray.com/io/flutter/x86_debug/1.0.0-40441def692f444660a11e20fac37af9050245ab/x86_debug-1.0.0-40441def692f444660a11e20fac37af9050245ab.pom'.
               > Read timed out
* 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 2m 38s
Exception: Gradle task assembleDebug failed with exit code 1

에러 메시지 중 Could not resolve io.flutter:x86_debug:1.0.0 패키지를 resolve 못한 상황임을 확인할 수 있다.

2. 해결 방법

내 경우에는, gradle 빌드캐쉬를 제거 하고 해결이 되었다. 

# Project 폴더 안에서

cd android
./gradlew cleanBuildCache

 

반응형

댓글