-
Notifications
You must be signed in to change notification settings - Fork 26.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
"Flutter/Flutter.h not found." on iOS. #16036
Comments
In the Can I ask you to remove (Meanwhile, I'll be trying to reproduce the error of the |
Thank you very much for your speedy reply. I have made this project around an hour ago (IIRC), so everything is newly generated, so I don't know how the dates are that inconsistent. I have deleted the
Edit: here is the new |
You did get a I could not reproduce the error you get in the Just noticed that your Cocoapods installation is 1.5.0.beta.1. Flutter tooling has not been tested with that version as far as I know. The |
Ok, thanks for checking. I've uninstalled Cocoapods using |
Did you redo pod installation after the downgrade of Cocoapods? The And |
Well, after running Sadly, doing the same thing for
I should mention that I got this error even before installing Cocoapods 1.5.0.beta.1. Edit:
|
Can I ask you to attach a zip of your |
Of course, here you go: |
Your Podfile in |
What fix are you referring to? If you meant this workaround:
I just added it, removed |
Sorry, my bad. That fix is relevant for Swift projects only. |
No problem. Very useful to know, though. Any other suggestions? |
No currently, I'm afraid. I cannot reproduce the error you get. |
I understand. I want to try to reinstall everything I can to see if that fixes anything. For example:
|
One might hope that it is enough to recreate the |
I'm receiving the same error:
|
Okay the issue was with using the beta version of cocoapods. It worked after downgrading. |
Thanks for the report. Unfortunately I’m also on 1.4.0 but still get this error. When I’m home I’ll try to see what I can do.
|
@0916174 |
Thanks for the suggestion. I've tried that just now. That also didn't work for me. Looking into doing a complete Mac reinstall, but I'm really not looking forward to it and want to avoid it at all costs. |
I run into similar issue on my sample project:
doctor -v output:
tried all above mentioned steps. |
I just tried and had similar issue on brand new created project - even when tried swift as language |
The only difference I see is the Flutter channel/version.
|
I fixed it by removing the dependency from pubspec.yaml -> run |
I changed channel to beta on flutter and it works fine. |
I am able to reproduce the error consistently using Cocoapods 1.5.0 (newly released) and freshly created Flutter projects (from Flutter master). It appears Cocoapods 1.5.0 deals differently with symlinks than some earlier versions, leading to a situation where the Flutter pod is effectively empty inside the Xcode project. The fix of #16273 appears to solve the problem. You can make this change manually to the I have tested that the changed Podfiles work with both Cocoapods 1.4.0 and Cocoapods 1.5.0. I have so far been unable to reproduce the issue with the former. |
Thanks for this suggestion. EditI noticed this in the output for running
Are these version numbers for |
the best solution for me. Thanks a lot |
@vankhoa01 you can also just delete |
I had the same problem. solve it by downloading v0.11.3. Dev Channel https://flutter.io/docs/development/tools/sdk/archive#macos |
I solved my problem by updating the pod setup. To update the CocoaPods for ios. Try it works like charm :) |
Hi, I am not sure, But I think that I've tried all solutions I can find on this issue. I am totally new to Flutter and just running the basic test projects. Everything worked as a charm until i tried to start the app on my iPhone and had to enter information in the "xcode Runner". Before that on an Android device and in the simulator it worked fine. Now it produces different errors but mostly I end up with the "Flutter/flutter.h" not found problem. (Only thing that works now is to run on Android phone) Please help me with this error, I've put more than a day of work to sort this problem out. Deleted all projects, uninstalling cocoapods and reinstalling it, trying different versions and so on.. Nothing helps, And oh, Flutter doctor is happy as always. |
Hi, @Pergius , the workaround that worked for me was also described at this link (#24428 (comment)). |
this is the best solution |
I had a same problem. Esys-share.h file not found.. please help me to resolve this iisue |
For anyone who also has issues with the Flutter.h not found, check your Flutter version. I had the 1.4 Flutter version and uninstalled it and then installed the stable version (1.2) and it worked. |
Thanks,this works for me. |
I'm experiencing this on one of our build machines. I've tried reinstalling Flutter, switching to the stable channel, making sure cocoapods is the same version as on the working machines and pretty much every other solution suggested. The only temporary success I've had is with yxfmlbb's fix in #24428. The Flutter.framework header files are replaced with aliases that lead nowhere when I run build --release, and after that the iOS build fails with Flutter.h file not found. I can only assume I haven't reinstalled Flutter completely. What else should I be doing besides deleting the Flutter installation directory? Edit: this appears to be some weird Jenkins issue as running the same commands from terminal does not overwrite the header files with shortcuts. |
Hopefully this helps someone-> I fixed this by doing pod install in my iOS project. It seemed it was caused by updating flutter and then the podspec for flutter being out of date. |
I started getting this error after doing a flutter update and adding shared_preferences to my project. I just tried deleting all the shared_preferences stuff, even from pubspec.yaml, and deleting the ios folder and running "flutter create ." and now when I try to build/run on the ios simulator I get:
and in case it helps:
|
Just run into the same problem. I removed the current pod files and pod folder I had, re-installed cocoapods, re run the app, and the issue was solved |
For me this was solved by editing podfile as mentioned by this #10654 (comment) and change the xcode's build system to legacy. |
I solved the problem by my I use the flutter channel stable v1.12.13+hotfix.6 |
I created a new app with |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Steps to Reproduce
Preface:
I'm on the flutter
master
channel and have runupgrade
half an hour ago.I've reinstalled flutter and cocoapods completely before and tried the fixes provided in #15437, #15532 and all other issues on GitHub looking like the problem I have. _
flutter create --template=plugin -i swift health_stats
cd health_stats/example
health_stats.zip
Logs
Run your application with
flutter run
and attach all the log output.Run
flutter analyze
and attach any output of that command also.Flutter Doctor
Paste the output of running
flutter doctor -v
here.Additional information
Creating and running a normal project works fine:
flutter create regular
cd regular
flutter run
However when adding a dependency like
path_provider
:and then
flutter packages get
,flutter run
produces this:I did not have
path_provider
version0.4.0
in my dart packages folder before running the app, so it's a fresh copy.I need to get this working a.s.a.p. since I need to make an app for our company soon.
The text was updated successfully, but these errors were encountered: