팀원과 작업했던 내용 merge 하면서 추가 작업 이어가려고 flutter run 을 돌렸는데 다음과 같이 오류를 뱉으며 실행이 꺼진다.
aunching lib/main.dart on iPhone 16 Plus in debug mode...
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Using `ARCHS` setting to build architectures of target `Pods-RunnerTests`: (``)
Finding Podfile changes
- Flutter
- cloud_firestore
- firebase_core
- firebase_storage
- geolocator_apple
- image_picker_ios
Fetching external sources
-> Fetching podspec for `Flutter` from `Flutter`
-> Fetching podspec for `cloud_firestore` from `.symlinks/plugins/cloud_firestore/ios`
cloud_firestore: Using Firebase SDK version '11.4.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
firebase_core: Using Firebase SDK version '11.4.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_storage` from `.symlinks/plugins/firebase_storage/ios`
firebase_storage: Using Firebase SDK version '11.4.0' defined in 'firebase_core'
-> Fetching podspec for `geolocator_apple` from `.symlinks/plugins/geolocator_apple/ios`
-> Fetching podspec for `image_picker_ios` from `.symlinks/plugins/image_picker_ios/ios`
Resolving dependencies of `Podfile`
CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: all_pods_versions_0_3_5.txt exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: Specs/0/3/5/Firebase/11.5.0/Firebase.podspec.json exists! Returning local because checking is only performed in repo update
3
CDN: trunk Relative path: Specs/0/3/5/Firebase/11.4.0/Firebase.podspec.json exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: all_pods_versions_0_9_f.txt exists! Returning local because checking is only performed in repo update
의존성 문제 같은데 라이브러리 버전은 바뀐 게 없었고 flutter clean 을 하고 다시 get 을 해도 동일한 오류가 발생한다.
해결1
프로젝트의 ios 폴더에서 다음과 같은 명령어를 실행하면 된다.
pod install --repo-update
알아서 의존성 잘 찾아서 업데이트하면 flutter run 가능!
참고: https://github.com/firebase/flutterfire/issues/16670
firebase_auth: Unable to find a specification for `firebase_core` depended upon by `firebase_auth` · Issue #16670 · firebase/f
Is there an existing issue for this? I have searched the existing issues. Which plugins are affected? Core, Auth Which platforms are affected? iOS, macOS Description When using a Mac running on Mac...
github.com
해결2
위 처럼 pod 레포 업데이트 해도 안된다면 pod 캐시를 지우고 다시 install
cd ios
pod cache clean --all
pod clean
pod install
해결3
그래도 오류가 발생하면
1. ios 폴더 밑 Podfile.lock 파일을 제거
(파일 삭제가 어렵다면 bakup 을 해두고 제거해도 됨)
2. flutter clean 진행
flutter clean
3. flutter pub get 후 실행
참고: https://stackoverflow.com/questions/54912188/flutter-ios-build-fail-on-running-pod-install
Flutter iOS build fail on running pod install
I'm trying to make a flutter plugin, so I created a plugin by steps provided on https://flutter.dev/docs/development/packages-and-plugins/developing-packages. I'm getting an error when I try to run...
stackoverflow.com
'에러 해결방법' 카테고리의 다른 글
[에러] The following assertion was thrown building: Tried to modify a provider while the widget tree was building. (0) | 2025.01.06 |
---|---|
[트러블슈팅] Hero 애니메이션 안되는 이유(feat. tag 설정) (1) | 2024.12.31 |
[트러블슈팅] 검색 api 를 사용한 지역 검색 앱 개발 중 에러 (0) | 2024.12.06 |
[에러] firebase 연동 중에 발생한 오류 (0) | 2024.11.29 |
[트러블슈팅] ListView 안에 ListeView(Feat. CustomScrollView) (0) | 2024.11.26 |
댓글