Skip to content
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 #25

Open
abaturyna opened this issue Dec 9, 2020 · 5 comments
Open

Fatal error: 'Flutter/Flutter.h' file not found #25

abaturyna opened this issue Dec 9, 2020 · 5 comments

Comments

@abaturyna
Copy link

Command CompileSwift failed with a nonzero exit code
In file included from /Users/nastya/Dropbox/BUSINESS/Soft/flutter 1.2.13/.pub-cache/hosted/pub.dartlang.org/launch_review-2.0.0/ios/Classes/LaunchReviewPlugin.m:1:
/Users/nastya/Dropbox/BUSINESS/Soft/flutter 1.2.13/.pub-cache/hosted/pub.dartlang.org/launch_review-2.0.0/ios/Classes/LaunchReviewPlugin.h:1:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
        ^~~~~~~~~~~~~~~~~~~
1 error generated.
Command CompileSwift failed with a nonzero exit code

My flutter doctor is. :

flutter doctor -v
[✓] Flutter (Channel dev, 1.25.0-4.0.pre, on Mac OS X 10.15.7 19H2 darwin-x64, locale ru-BY)
• Flutter version 1.25.0-4.0.pre at /Users/nastya/Dropbox/BUSINESS/Soft/flutter
• Framework revision a7f5fd5360 (9 дней назад), 2020-11-30 13:14:13 +0100
• Engine revision 20caf54969
• Dart version 2.12.0 (build 2.12.0-76.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/nastya/Library/Android/sdk
• Platform android-29, build-tools 29.0.3
• 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-6222593)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
• Xcode at /Applications/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.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 47.1.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] IntelliJ IDEA Ultimate Edition (version 2020.1.1)
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin version 45.1.3
• Dart plugin version 201.7223.97

[✓] Connected device (3 available)
• nastenka’s iPhone (mobile) • 00008030-000A113802E2802E • ios • iOS 14.2
• Web Server (web) • web-server • web-javascript • Flutter Tools
• Chrome (web) • chrome • web-javascript • Google Chrome 87.0.4280.88

• No issues found!

@Purus
Copy link
Owner

Purus commented Mar 7, 2021

I am sorry. I don't have a Mac to verify on the iOS implementation. The support was added by contributors.

@pythoneer
Copy link

I had a similar error while upgrading to Flutter2. What helped was to delete the cocoapods cache and make a clean flutter build (maybe it was also necessary to delete the Podfile and the .lock and recreate it with pod install)

please see the help on pod -h for the actual commands this is just out of my head

pod cache clean --all
pod install
flutter clean

@rgb1380
Copy link

rgb1380 commented Apr 7, 2021

I had this problem with several packages when upgrading to flutter 2.0. What worked for me at the end was adding this line 'flutter_additional_ios_build_settings(target)' to post_install in Podfile. See the excerpt below:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'

@Purus
Copy link
Owner

Purus commented Apr 7, 2021 via email

@rgb1380
Copy link

rgb1380 commented Apr 7, 2021

If possible can you create a pr with the proposed changes?

It is not an issue with this plug-in. The changes need to be made to the hosting project's Podfile directly. I have come across this problem with a number of different plug-in when upgrading to Flutter v2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants