반응형
"Build failed due to use of deprecated Android v1 embedding." 에러는 현재 플러터가 안드로이드 버전이 오래된 v1을 사용해서 발생한 문제입니다.
전체 에러 안내문
Warning
Your Flutter application is created using an older version of the Android
embedding. It is being deprecated in favor of Android embedding v2. Follow the
steps at
https://flutter.dev/go/android-project-migration
to migrate your project. You may also pass the --ignore-deprecation flag to
ignore this check and continue with the deprecated v1 embedding. However,
the v1 Android embedding will be removed in future versions of Flutter.
수정 방법은 간단합니다.
안드로이드 내 "AndroidManifest.xml" 파일을 수정하면 됩니다.
# 기존 "AndroidManifest.xml" 파일 내용
<application
android:name="io.flutter.app.FlutterApplication"
위 내용을 다음과 같이 변경하면 됩니다.
# "AndroidManifest.xml" 변경
<application
android:name="${applicationName}"
그리고 "<application " 내 "<meta-data />"를 다음과 같이 추가합니다.
<meta-data
android:name="flutterEmbedding"
android:value="2" />
변경 후 다시 컴파일을 진행하면 해당 에러가 발생하지 않은 것을 알 수 있습니다.
반응형
'프로그램 개발해서 돈벌기 > flutter' 카테고리의 다른 글
유튜브 처럼 플레이 화면과 하단에 동영상 리스트가 보일때 동영상 리스트를 클릭 시 상단 플레이에 플레이 되게 만들기 (0) | 2024.03.04 |
---|---|
flutter에서 자식 위젯이 부모 위젯 함수 호출하기 (0) | 2024.02.23 |
flutter iOS에 권한 요청 방법 : 주소록에 접근 권한 요청하기 (0) | 2023.09.20 |
flutter에서 iOS 기기에 릴리즈(Release) 모드로 커맨드라인(command line)에서 실행하기 (0) | 2023.09.15 |
ElevatedButton을 이용해서 모서리가 둥글고 아이콘이 적용된 버튼 만들기 (0) | 2023.08.22 |
댓글