2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

M1 MacでFlutterをビルドした際に発生するエラーの対処法

Posted at

エラーの詳細

FlutterのプロジェクトにFirebaseを追加した際、以下のようなエラーに遭遇しました。
解決方法は記事の一番下に書いてあるので、必要がなければ読み飛ばして下さい。

Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.
To update the CocoaPods specs, run:
  pod repo update

Error running pod install
Error launching application on iPhone SE (3rd generation).

指示通りに $pod install を実行したところ、今度は別のエラーが発生。

$pod install
...
You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

エラーの指示に従い進めていきます。

$ pod repo update
...
Don't forget to anonymize any private data!

Looking for related issues on cocoapods/cocoapods...
Searching for inspections failed: undefined method `map' for nil:NilClass

同じような状況で苦戦している方がいたので、下記のサイトを参考にさせていただきました。
How to solve: Error updating CocoaPods after upgrading to flutter 3.0.1

どうやらM1Macでは下記の手順で解決できるようです。


解決手順

手順1: FFIのアップデート
任意のディレクトリでFFIをアップデートします。

sudo arch -x86_64 gem install ffi

手順2:プロジェクトのiosフォルダに移動し、podをアップデート

arch -x86_64 pod update

手順3:podのインストール

arch -x86_64 pod install

無事プロジェクトのビルドに成功しました。
ぜひ試してみて下さい。

2
2
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
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?