HELP! Fatal error: 'Flutter/Flutter.h' file not found #import <Flutter/Flutter.h> - iOS

214 views
Skip to first unread message

Alvaro Gonzalez Rico

unread,
Jun 19, 2021, 7:57:36 PM6/19/21
to Flutter Development (flutter-dev)
Hello! My app was working well until I came across the following issue: "Fatal error: 'Flutter/Flutter.h' file not found #import <Flutter/Flutter.h>" :

Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
lib/main.dart:1
Xcode build done.                                            8.1s
Failed to build iOS app
Error output from Xcode build:
    ** BUILD FAILED **
Xcode's output:
    In file included from /Users/XnameX/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.2/ios/Classes/FLTPathProviderPlugin.m:5:
    /Users/XnameX/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.2/ios/Classes/FLTPathProviderPlugin.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^~~~~~~~~~~~~~~~~~~
    1 error generated.
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Analyzing workspace
    note: Constructing build description
    note: Build preparation complete
    note: Removed stale file '/Users/XnameX/Library/Developer/Xcode/DerivedData/Runner-cfjslqyzzdpnoyeoygvffcmbgtpq/Build/Products/Debug-iphonesimulator/sqflite/sqflite.framework'
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.
Exited (sigterm)

What can I do to resolve this? Thanks a lot in advance!

Alvaro Gonzalez Rico

unread,
Jun 22, 2021, 10:52:34 AM6/22/21
to Flutter Development (flutter-dev)
After investigating the problem, the issue seems to come from 2 docs: "FLTPathProviderPlugin.h” (issue: “'Flutter/Flutter.h' file not found”) and “FLTPathProviderPlugin.m” (issue: “1. In file included from /Users/XnameX/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.2/ios/Classes/FLTPathProviderPlugin.m:5:”). Something that I noticed is that the folder “.pub-cache” does NOT seem to be in Users/XnameX/Desktop/flutter when I look for it in my Finder. What could it be?
Reply all
Reply to author
Forward
0 new messages