0

I try to run flutter project both of Android studio and xcode and get fatal error Flutter/Flutter.h not found. I stucked on this point. Please help me

this is my dependencies:

dependencies: flutter_localizations: sdk: flutter animations: ^2.0.1 #webview_flutter: ^3.0.4 audioplayers: ^0.20.1 buttons_tabbar: ^1.2.0 chewie: ^1.0.0 cupertino_icons: ^1.0.2 flutter_native_splash: ^2.2.6 cupertino_tabbar: ^2.0.0 dio: ^4.0.0 equatable: null firebase: ^9.0.2 firebase_core: ^1.10.0 firebase_messaging: ^12.0.1 firebase_auth: any flutter: sdk: flutter flutter_bloc: ^7.3.0 flutter_html: ^3.0.0-alpha.5 flutter_local_notifications: ^9.1.3 flutter_slidable: ^2.0.0 flutter_svg: ^1.1.1+1 flutter_widget_from_html: ^0.8.2 flutter_windowmanager: ^0.2.0 firebase_messaging_platform_interface: ^4.1.0 get_it: ^7.2.0 google_fonts: ^3.0.1 http: ^0.13.3 im_stepper: ^1.0.1+1 image_picker: ^0.8.4 intl: ^0.17.0 introduction_screen: ^3.0.2 pin_code_text_field: ^1.8.0 retrofit: ^3.0.1+1 shared_preferences: ^2.0.7 solid_bottom_sheet: ^0.1.9 url_launcher: ^6.0.13 video_player: ^2.2.7 video_viewer: ^1.2.7 youtube_player_flutter: ^8.0.0 flutter_cache_manager: ^3.3.0 keyboard_actions: ^4.0.1 curved_navigation_bar: any lottie: any version_check: ^0.2.1 package_info_plus: ^1.4.2 store_redirect: ^2.0.1 fluttertoast: ^8.0.8

flutter_screenutil: ^5.3.1

1 Answers1

0
  1. Backup ios/Runner folder.
  2. Delete the ios folder.
  3. Run flutter create (your project name). in the previous folder where you have your project(cd users/user/"projects_folder") (this will recreate your ios folder).
  4. Paste your Runner backup in the ios folder (into the project).
  5. Open Runner.xcworkspace (into ios folder) and there, check the Version, the Bundle ID, all the info.
  6. (If do you Have Firebase, you have to copy and paste again the Google Service-Info.Plist into the Runner folder (Always through Xcode) (If do you do this manually, it doesn't work).

Finally, flutter run and should work!

If flutter run fails:

  1. cd ios
  2. pod install
  3. cd ..
  4. flutter run