2
1

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 3 years have passed since last update.

【Flutter】fatal error: 'Flutter/Flutter.h' file not foundの対処法

Last updated at Posted at 2021-06-25

#エラー内容
iOSでのビルドを試みたところ、

fatal error: 'Flutter/Flutter.h' file not found

という内容のエラーが表示された。

#解決策
今回は、以下の二通りの解決策を試してみたところ、私の場合は解決策2の方で解決できました。
####解決策1
エディター内のターミナルにて下記を実行

rm ios/Flutter/Flutter.podspec
flutter clean

####解決策2
Podfileの下の方にある、post_installから始まる部分を以下のように変更

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end

#動作環境

[✓] Flutter (Channel stable, 2.2.0, on macOS 11.2.3 20D91 darwin-x64, locale ja-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] Connected device (3 available)
    ! Error: iPhone is not connected. Xcode will continue when iPhone is connected. (code -13)

• No issues found!

Dart 2.13.0

参考文献

この記事は以下の情報を参考にして執筆しました。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?