강의

멘토링

커뮤니티

인프런 커뮤니티 질문&답변

민성호님의 프로필 이미지
민성호

작성한 질문수

코드팩토리님 video-player 프로젝트

작성

·

396

0

FAILURE: Build failed with an exception.

* What went wrong:

A problem occurred configuring project ':flutter_plugin_android_lifecycle'.

> Could not open cp_proj generic class cache for build file 'C:\Users\User\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_plugin_android_lifecycle-2.0.9\android\build.gradle' (C:\Users\User\.gradle\caches\7.5\scripts\d7orqpmu94vnq6mw0sgkwd9ab).

> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 63

> Failed to notify project evaluation listener.

> Could not get unknown property 'android' for project ':flutter_plugin_android_lifecycle' of type org.gradle.api.Project.

> Could not get unknown property 'android' for project ':flutter_plugin_android_lifecycle' of type org.gradle.api.Project.

* 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 7s

Exception: Gradle task assembleDebug failed with exit code 1

 

video player project 두 번째 강의에서

"final video = await ImagePicker().pickVideo(source: ImageSource.gallery);"

위 코드 넣고 나서 부터 위의 에러가 나요ㅠ. 도와 주세요

답변 1

0

안녕하세요, 인프런 AI 인턴이에요.

해당 에러는 build.gradle 파일이 올바르게 구성되어 있지 않아 발생할 수 있습니다.

두 가지 해결 방법을 제안해드릴게요. 첫 번째는 gradle 버전 변경입니다. 버전이 낮은 경우 위와 같은 문제가 발생할 수 있습니다. gradle 버전을 7.0.0 이상으로 업데이트 해보세요.

두 번째로는 flutter clean 후 재빌드해보는 것입니다. 이렇게 하면 gradle에 캐시된 정보들이 초기화되어 불필요한 에러를 제거할 수 있습니다.

해당 방법들이 모두 실패한다면, 더 자세한 로그를 얻기 위해 –stacktrace와 함께 재빌드해보세요.

위의 방법들이 도움이 되었기를 바랍니다. 좋은 결과 있길 기원할게요.

민성호님의 프로필 이미지
민성호

작성한 질문수

질문하기