Sponsored Links
はじめに
自分用のメモとして作成した記事のため説明が非常に荒くなっています。
ご了承ください。
現象
FlutterをiOSエミュレータでビルドした際にエラーが発生し、以下のメッセージが表示されました。
Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.
To update the CocoaPods specs, run:
pod repo update
Exception: Error running pod install
対策
以下の手順通りに操作を行います。
- ios/Pods/, ios/Podfile, ios/Podfile.lockを削除(iOSリビルドにより再生成されるため、削除しても問題ありません。)
flutter run
- https://qiita.com/tomono_22/items/1d71031d3832bb5a2cca【解決】のところ
-
sudo arch -x86_64 gem install ffi
※M1 mac cd ios
arch -x86_64 pod install --repo-update
※ M1 macflutter clean
flutter run
私の場合はこれでうまくいきました。
ダメな場合は、ios/Flutter/Debug.xcconfigの
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
を
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"
に置き換えてみてください。
参考
https://qiita.com/1440/items/836d8e19fd819a4ebbc4