0
0

More than 1 year has passed since last update.

IDE上でiOSのアプリ起動ができなくなった場合のtips

Posted at

この場合、IDEの実行ボタンではなくコンソールでflutter runすると起動できます。
※こんなエラーが出ます

Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Warning: CocoaPods is installed but broken. Skipping pod install.
  You appear to have CocoaPods installed but it is not working.
  This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
  This can usually be fixed by re-installing CocoaPods. For more info, see https://github.com/flutter/flutter/issues/14293.
To re-install:
  sudo gem install cocoapods

CocoaPods not installed or not in valid state.

結論

IDEをコンソールから起動してください。(open /Applications/Android\ Studio.app
原因はあまり深く追っていないので正確にはわからないのですが、
GUI経由で起動した場合とTerminal経由で起動した場合でPATHの読み込み結果が変わってしまうらしく、以降名前解決が上手く出来なくなってしまうことに寄るらしいです。

奮闘記録

IDEを変えてみる

IntelliJ IDEAAndroid StudioVSCode
事象全く変わらず。

XCodeのビルドが通るのか試してみる

通らない。同じエラーが出る。

rbenvではなくシステムのrubyに切り替える

m1 mac × rbenv × cocoapodsの組み合わせが悪いらしい。
rbenvをアンインストールしてシステムのrubyに切り替え、homebrewでcocoapodsをインストールし直す。
事象全く変わらず。

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