launch_review icon indicating copy to clipboard operation
launch_review copied to clipboard

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

Open abaturyna opened this issue 3 years ago • 5 comments

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!

abaturyna avatar Dec 09 '20 11:12 abaturyna

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

Purus avatar Mar 07 '21 16:03 Purus

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

pythoneer avatar Mar 24 '21 14:03 pythoneer

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'

rgb1380 avatar Apr 07 '21 01:04 rgb1380

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

On Wed, 7 Apr, 2021, 6:45 am rgb1380, @.***> wrote:

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'

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Purus/launch_review/issues/25#issuecomment-814531473, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIHDZ7R4SLQGOGPCW6CJNDTHOWZ5ANCNFSM4UTKYZFQ .

Purus avatar Apr 07 '21 07:04 Purus

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.

rgb1380 avatar Apr 07 '21 07:04 rgb1380