はじめに
Windowsで作成したFlutterアプリをGitリポジトリを通してMacにダウンロード。
それを起動させようとしたらエラーが出てきた。
Firebase関連のプラグインのバージョンを変えたりして、試行錯誤していたら余計にハマった。
バージョンがあってないやら、ファイルがみつからないやら、、、、、
あまりにも適当にやりすぎてエラーを再現できないが、備忘録としてエラー回避できた方法をいくつか残す。
エラー内容
Error output from CocoaPods:
↳
[!] Automatically assigning platform `iOS` with version `9.0` on target `Runner` because no
platform was specified. Please specify a platform for this target in your Podfile. See
`https://guides.cocoapods.org/syntax/podfile.html#platform`.
Exception: Error running pod install
対策①
1.ダウンロードしたプログラムファイルのプログラム名/ios/Runner.xcworkspace
をxcode
で開く
2.赤枠で囲んだ部分のバージョンをiOS 13.0
に変更
3.xcode
を保存して閉じる
4.flutter run
対策②
1.flutter clean
2.flutter build
対策③
1.flutter clean
2.flutter pub get
3.cd ios
4.pod install
5.pod repo update
6.pod update
7.cd ..
8.flutter run
対策④
1.対策①の3までやる
2.対策③を全部やる
参考URL
https://github.com/FirebaseExtended/flutterfire/issues/1979
https://dolphinetech.com/flutter/error-running-pod-install/
https://fluttercorner.com/solved-error-could-not-find-included-file-generated-xcconfig-in-search-paths-in-target-runner/
最後に
エラーが出るとどうしてもあわわなる、、、
落ち着いてエラー内容をちゃんと読めば何とかなるさ!
最初からMacで作ればいいじゃない