3
3

More than 3 years have passed since last update.

Flutter ios 環境構築メモ <Errorへの対処>

Last updated at Posted at 2020-08-21

<追加で更新中 最終更新日(2020/08/22)>

本文は,Flutterアプリ開発においてiosでのErrorが起こった内容および,それに対してTryしたことのメモ.
自身が開発中に発生したエラーを共有させていただきます.また違う解決策があれば教えていただけると嬉しく思います.

Error1:Warning: CocoaPods not installed.

Debug時に発生するエラー内容

  1. 通常

brew install cocoapods
pod setup

2. 1,で完了しない場合


sudo gem uninstall cocoapods
rm -Rf Pods/
rm -Rf Podfile
rm -Rf Podfile.lock
rm -Rf Runner.xcworkspace
brew link --overwrite cocoapods
flutter build ios

上記の2つを行うことで解消することができた.

Error2: error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.

flutter build ios 時に発生するエラー内容

diff: /../ios/./Pods/Podfile.lock: No such file or directory
diff: /../ios/Pods/Pods/Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.

pod install を行っても,エラーは解消されない.........

◆対処法:下記URLを実行
https://www.ateliee.com/archives/2364

◆上記でも治らなかった場合

Phase 1
1. choose the target > go to Build Phrases > click Link Binary With Libraries > remove all libPods.a files


2. pod install
3. flutter clean and flutter build ios

Phase 2
1. open Terminal


2. pod deintegrate --verbose    
3. pod install --verbose

Phase 3
1. choose the target > go to Build Settings > click "+" sign
2. add 2 User-Defined Settings: [to the left = to the right]
3. PODS_ROOT = ${SRCROOT}/Pods
4. PODS_PODFILE_DIR_PATH = ${SRCROOT}/

Phase 4
もう一度アプリを作り直す...............

Phase 4まで行うことでようやく解消されましたが,これは正しい解決策とは言えないです.ですので,同じエラーにぶつかった方で解消法がありましたら,教えてください:cry:

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3