flutter 버전 업그레이드 후기(2.10.4 -> 3.3.4)

2022. 12. 7. 12:48·frameworks/flutter

이 글은 2022년 10월 7일에 첫 작성되었습니다.

(https://github.com/shs395/shs395.github.io/blob/master/content/flutter/version-upgrade/index.md)


버전 업그레이드

자세한 사항을 보려면 Upgrading Flutter(공식문서)

버전 업그레이드 자체는 되게 간단했다.

flutter upgrade

한줄이면 스테이블 버전으로 업그레이드 된다.

Upgrading Flutter to 3.3.4 from 2.10.4 ...

너무 쉽네 하고 앱을 빌드해보았더니 역시 에러가 났다.
간단한 앱인데도 쉽게쉽게 안되는구나,,
하나씩 해결해보자


에러 해결법


deployment target 에러

The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.0.99. (in target 'GoogleUtilities' from project 'Pods')
가장 많은 줄을 차지하고 있던 에러, Pods의 target들의 deployment target을 12.0 으로 올려서 해결하였다. podfile을 수정해주면 된다.

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
    end
  end
end

전체적인 해결과정은 이 글을 참고하면 된다.
stackoverflow에서는 podfile 수정하는 법을 알려준다.


pod update, pod install 안될 때

에러 해결 과정이 너무 어지러워서 깔끔하게 정리가 안된다.
다만 pod update를 통해 다양한 문제를 해결할 수 있는데, pod update 시 에러가 나는 경우가 있다.
이 때 해결법은 아래와 같다.

sudo arch -x86_64 gem install ffi
arch -x86_64 pod update
arch -x86_64 pod install

Couldn't find constructor 'VelocityTracker'.

혹시 modal_bottom_sheet을 사용한다면 pubspec.yaml에서 버전을 수정해주자 (출처)

modal_bottom_sheet: ^2.0.1 

CocoaPods did not set the base configuration of your project because your project already has a custom config set

https://github.com/flutter/flutter/issues/66222


이상한 에러

아주 요상한 에러.. 아래 무적기를 써보자 (안될 수도 있음)

2022-10-07 03:06:57.213 xcodebuild[50526:356450] warning:  The file reference for "GoogleAppMeasurement-xcframeworks.sh" is a member of multiple groups ("Support Files" and "Support Files"); this indicates a malformed project.  Only the membership in one of the groups will be preserved (but membership in targets will be unaffected).  If you want a reference to the same file in more than one group, please add another reference to the same path.
2022-10-07 03:06:57.213 xcodebuild[50526:356450] warning:  The file reference for "GoogleAppMeasurement.debug.xcconfig" is a member of multiple groups ("Support Files" and "Support Files"); this indicates a malformed project.  Only the membership in one of the groups will be preserved (but membership in targets will be unaffected).  If you want a reference to the same file in more than one group, please add another reference to the same path.
2022-10-07 03:06:57.213 xcodebuild[50526:356450] warning:  The file reference for "GoogleAppMeasurement.release.xcconfig" is a member of multiple groups ("Support Files" and "Support Files"); this indicates a malformed project.  Only the membership in one of the groups will be preserved (but membership in targets will be unaffected).  If you want a reference to the same file in more than one group, please add another reference to the same path.

무적기

flutter 오류 해결하려고 구글링 하면 제일 많이 보이는 것,,
실제로 많은 에러에서 효과가 있는 듯 하다.
사용하기 전에 [Cocoapods] pod install? pod update? 제대로 알고 쓰자 를 읽어보면 좋다.

ios/Podfile.lock 삭제
flutter clean
flutter pub get
arch -x86_64 pod repo update (ios 폴더에서)
arch -x86_64 pod update (ios 폴더에서)

후기

버전 업그레이드가 잘됐다. 담부턴 미리미리 해야겠다.

'frameworks > flutter' 카테고리의 다른 글

Built build/app/outputs/flutter-apk/app-debug.apk 에서 멈출 때  (1) 2024.09.02
플러터 vscode 멀티 디바이스 디버깅  (0) 2024.07.18
Flutter 3.16을 올리고 UI 문제가 생겼다면  (1) 2024.01.04
안드로이드 splash screen 중복 문제 해결하기  (0) 2023.01.07
'frameworks/flutter' 카테고리의 다른 글
  • Built build/app/outputs/flutter-apk/app-debug.apk 에서 멈출 때
  • 플러터 vscode 멀티 디바이스 디버깅
  • Flutter 3.16을 올리고 UI 문제가 생겼다면
  • 안드로이드 splash screen 중복 문제 해결하기
uzzam
uzzam
  • uzzam
    uzzam.dev
    uzzam
  • 전체
    오늘
    어제
    • 분류 전체보기 (55)
      • blockchain (6)
        • geth 소스코드 분석 (4)
        • solidity (0)
      • blockchain (리서치) (1)
      • blockchain (투자) (2)
      • 프로젝트 - 뮤피 (0)
      • 프로젝트 - 담타 (9)
        • 소개 (1)
        • 프로젝트 관리하기 (4)
        • 리팩터링 (3)
        • etc. (1)
      • CS (0)
        • 운영체제 (0)
      • ps, cp (5)
        • 코딩테스트 cheatsheet (4)
        • baekjoon (1)
        • codeforces (0)
      • languages (2)
        • dart (1)
        • swift (1)
        • go (0)
      • frameworks (5)
        • flutter (5)
        • spring (0)
      • ios (2)
      • 블로그 (10)
      • git (2)
      • cloud (5)
      • etc. (6)
      • linux (0)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    블로그
    geth
    go-ethereum
    이더리움
    flutter
    디버깅
    멀티디바이스
    geth 분석
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.1
uzzam
flutter 버전 업그레이드 후기(2.10.4 -> 3.3.4)
상단으로

티스토리툴바