12
12

More than 3 years have passed since last update.

flutter iOSでビルドできない時の対処法

Last updated at Posted at 2019-12-27

初めてQiitaに投稿してみます、、、

現象

  • flutterAndroid Studioを使い始めて数週間のペーペーです。
  • simulator.appのiOSのシミュレータで、runを実行すると、以下のようなビルドの失敗が続くようになりました。
Launching lib/main.dart on iPhone Xʀ in debug mode...
Running Xcode build...
Xcode build done.                                           12.2s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **

Xcode's output:
↳
    /build/ios/Debug-iphonesimulator/Runner.app: resource fork, Finder information, or similar detritus not allowed
    Command CodeSign failed with a nonzero exit code
    note: Using new build system
    note: Planning build
    note: Constructing build description

Could not build the application for the simulator.
Error launching application on iPhone Xʀ.

そこで、こちらの記事 のように、iosディレクトリに移動して、

$ pod reset

を実行しても、同じエラーが出て解決せず。。。

解決方法

ターミナルでflutter cleanを実行。

$ flutter clean
Cleaning Xcode workspace...                                         2.9s
Deleting build...                                                   17ms
Deleting .dart_tool...                                               1ms

感想

  • これで、runが通ってビルドが成功したけど、一回切ってしまうと、次runする時にはこのエラーがまた出てきててしまい、毎回flutter cleanするのは面倒だなぁ
  • もっといい方法がありそう。。。
12
12
5

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