【Flutter Udacity講座】ProcessException Ensure your bundle contains a CFBundleVersionと怒られたときの解決法

記事内に商品プロモーションを含む場合があります

技術メモ

Flutterの習得に向けて、Udacityのチュートリアル講座を受けています( Build Native Mobile Apps with Flutter

 

Build Native Mobile Apps with Flutter
Learn online and advance your career with courses in programming, data science, artificial intelligence, digital marketing, and more. Gain in-demand technical s...

 

上記講座のLesson1 13.Quiz: Code Your Own Category Widgetで詰まったので解決策を記載します。

 

問題:flutter run でシミュレータが起動できない

flutter runしても、Oops; flutter has exited unexpectedly. と出てシミュレータが起動できない。

 

flutter_01.logをチェックしてみます。

 

ProcessException: ProcessException: Process "/usr/bin/xcrun" exited abnormally:
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The application's Info.plist does not contain CFBundleVersion.
Ensure your bundle contains a CFBundleVersion.

 

アプリケーションのInfo.plistにはCFBundleVersionが含まれていません。
バンドルにCFBundleVersionが含まれていることを確認してください。

と記載があります。

 

解決方法:pubspec.yamlに version: 1.0.0+1 を追記する

pubspec.yamlにバージョンを追記します。

 

これで問題なく実行することができました。

 

 

日本語でFlutterの概要を知るなら以下の書籍がオススメです。

 

技術メモ
スポンサーリンク
スポンサーリンク
のすけをフォローする
やばブロ!

コメント