Home > Enterprise >  Not able to find flutter.h file
Not able to find flutter.h file

Time:02-13

Spent an hour trying to debug this error with stack overflow and GitHub. Any help appreciated. I tried the deleting iOS file and doing flutter clean and stuff.

Error (Xcode): 'Flutter/Flutter.h' file not found
/Users/ME/Desktop/fitnessapp/ios/Runner/GeneratedPluginRegistrant.h:9:8


Error (Xcode): failed to emit precompiled header
'/Users/ME/Library/Developer/Xcode/DerivedData/Runner-gzhzlsjpfyzcnebymqrpzjndrlbm/Build/Intermediates.noindex/PrecompiledHeaders/Runner-Bridging-Header-swift
_10LJ9PKPTMFQI-clang_1OUD1W5Q54EHI.pch' for bridging header'/Users/ME/Desktop/fitnessapp/ios/Runner/Runner-Bridging-Header.h'


Could not build the application for the simulator.
Error launching application on iPhone 13 Pro.

CodePudding user response:

The same issue i have before a thou days and in mycase the solution was to run:

  1. flutter upgrade
  2. flutter create .

and if that don't work please try this command's out:

  1. rm ios/Flutter/Flutter.podspec
  2. flutter clean
  3. flutter pub get
  4. cd ios
  5. pod install

CodePudding user response:

You could try to do this:

  1. Backup Runner folder
  2. Delete the ios folder
  3. Go to a terminal and execute flutter create . in the flutter project folder
  4. Paste your Runner folder back into the ios folder
  5. pod deintegrate in the ios folder
  6. pod install also in the ios folder
  7. flutter clean in the flutter project folder
  8. flutter pub get
  9. flutter run

Please note that if you use firebase you need to re-insert the GoogleService-Info.plist file

Hope it helps, but if it still does not make sure you are in stable channel

  • Related