-
Notifications
You must be signed in to change notification settings - Fork 27.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fatal error: 'Flutter\Flutter.h' file not found #import <Flutter\Flutter.h> - IOS #70895
Comments
Same here, it just started to produce same exact error, for |
Having this same error log with url_launcher on flutter version 1.22.4 (stable channel) |
I tried the solution above suggested by @TahaTesser, incl. re-installing Flutter, however I also still have the same issue with the
|
Hi everyone, sorry for the delay, I was on vacation Running "flutter pub get" in video_player_example...
Launching lib/main.dart on iPhone 12 in debug mode...
lib/main.dart
Xcode build done. 4.6s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
/Users/tahatesser/.pub-cache/hosted/pub.dartlang.org/video_player-1.0.1/ios/Classes/messages.m:4:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
1 error generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 12.
Exited (sigterm) flutter doctor -v[✓] Flutter (Channel dev, 1.24.0-10.2.pre, on macOS 11.0.1 20B29 darwin-x64,
locale en-GB)
• Flutter version 1.24.0-10.2.pre at /Users/tahatesser/Code/flutter_dev
• Framework revision 022b333a08 (12 days ago), 2020-11-18 11:35:09 -0800
• Engine revision 07c1eed46b
• Dart version 2.12.0 (build 2.12.0-29.10.beta)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /Users/tahatesser/Code/sdk
• Platform android-30, build-tools 30.0.2
• ANDROID_HOME = /Users/tahatesser/Code/sdk
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
• Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
• Xcode 12.2, Build version 12B45b
• CocoaPods version 1.10.0
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6915495)
[✓] VS Code (version 1.51.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.16.0
[✓] Connected device (4 available)
• iPhone 12 (mobile) • BBCEDCF6-A80B-49DC-86EE-C9B542A9AD1B • ios
• com.apple.CoreSimulator.SimRuntime.iOS-14-2 (simulator)
• macOS (desktop) • macos • darwin-x64
• macOS 11.0.1 20B29 darwin-x64
• Web Server (web) • web-server • web-javascript
• Flutter Tools
• Chrome (web) • chrome • web-javascript
• Google Chrome 87.0.4280.67
• No issues found!
|
Hm, I just tried on |
Hi @jmagman |
We've been seeing reports like this for a very long time. #16036 https://github.com/flutter/flutter/issues?q=is%3Aissue+%22Flutter%2FFlutter.h+not+found%22+is%3Aclosed #70224 is now available in 1.25.0-4.0.pre, which is currently on the dev channel. If anyone sees something similar in the dev or master channel, please let us know. |
Just hit this, while switching from Master to stable channel. Running the commands bellow does not solve the issue!
logsLaunching lib/main.dart on iPhone 12 Pro Max in debug mode...
Running Xcode build...
Xcode build done. 7.2s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
In file included from /Users/pedromassango/Code/flutter_stable/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FlutterWebView.m:5:
/Users/pedromassango/Code/flutter_stable/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FlutterWebView.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
In file included from /Users/pedromassango/Code/flutter_stable/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/JavaScriptChannelHandler.m:5:
/Users/pedromassango/Code/flutter_stable/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/JavaScriptChannelHandler.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
In file included from /Users/pedromassango/Code/flutter_stable/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FLTWKNavigationDelegate.m:5:
/Users/pedromassango/Code/flutter_stable/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FLTWKNavigationDelegate.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
In file included from /Users/pedromassango/Code/flutter_stable/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FLTWebViewFlutterPlugin.m:5:
/Users/pedromassango/Code/flutter_stable/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FLTWebViewFlutterPlugin.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: Constructing build description
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'webview_flutter' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'Flutter' from project 'Pods')
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max. |
@pedromassango just got this same issue... what works for me right now was these steps hopefully works for you as well. I was on master so:
kill the IOS simulator then open a new one |
Unfortunately this doesn't work for me. It only happens in beta, not stable. Not sure if it's a factor, but I'm using M1 chip. |
I do this, this is ultimate solution
|
the ultimate solution didn't work. Sad times. |
Just ran into this, and thought I'd offer some observations:
Oh, and this is the 2nd or 3rd incident for me in last 3-4 mos. Seems to come back. |
You're correct, Stable works well. I don't see this issue with stable. But I need flutter to work with Beta channel as I need to to use flutter build ipa command, which is only in beta at the moment. |
Have you all tried deleting the DerivedData folder from /Users//Library/Developer/Xcode/DerivedData? Usually after flutter clean and doing that, it should work. |
I should clarify that I had this come up on Stable channel. But changing channels (and the subsequent update of dev channel) seemed to reset things so that I could go back to stable and have it load. |
After having resolved the issue yesterday, working on my production project all day, and closing down, I reopened my class project this morning and on running to emulator, I got the error again. I removed the Flutter.podspec, which seemed to be the magic step for me in restoring things. My steps below got things working again:
Something's not clean in switching between projects. |
I'm confident of my analysis in #70895 (comment), and 61 +1 agree. This issue was happening when upgrading Flutter to a version that contains #70224 and then downgrading it to a more stable channel. We cherry-picked a workaround to stable in 1.25 where a So if you are seeing this issue on any current channel after a |
Changing PodFile from to
solved it for me. |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
I think he/she is talking about the beta channel but is just stating that it is stable since beta channel is stable (or should be) |
This comment has been minimized.
This comment has been minimized.
@duzenko it's fixed with a So, to repeat:
I'm locking this closed issue as the originally reported problem has been resolved. If you are seeing an error like |
Steps to Reproduce
Not sure what Steps. App has been running Fine until today.
was trying to solve an issue with Hot-restart, pressed stop app, then went to restart, and now the app wont load with this failure.
flutter create bug
.logs
The text was updated successfully, but these errors were encountered: