Skip to content

about Flutter/flutter.h not found on ios #24428

Closed

Description

@yxfmlbb
/Users/yxfmlbb/.pub-cache/hosted/pub.flutter-io.cn/share-0.5.3/ios/Classes/SharePlugin.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
        ^~~~~~~~~~~~~~~~~~~
1 error generated.
In file included from /Users/yxfmlbb/.pub-cache/hosted/pub.flutter-io.cn/flutter_webview_plugin-0.3.0+2/ios/Classes/FlutterWebviewPlugin.m:1:
/Users/yxfmlbb/.pub-cache/hosted/pub.flutter-io.cn/flutter_webview_plugin-0.3.0+2/ios/Classes/FlutterWebviewPlugin.h:1:9: fatal error: 'Flutter/Flutter.h' file not
found
#import <Flutter/Flutter.h>
        ^~~~~~~~~~~~~~~~~~~
1 error generated.

I find that this problem may be the cause

Flutter/bin/cache/artifacts/engine/ios-release/Flutter.framework/Headers

If the contents are shortcuts instead of files, flutter.h not found appears

1

I tried to unzip Flutter. Framework. Zip and replace the Flutter. Framework, Then it worked??

2
3
4

However, when I used android Studio again, it was the same

5

And, when I try the terminal ‘flutter run ios’,The problem comes up again

Flutter/bin/cache/artifacts/engine/ios/Flutter. The framework/Headers

The files inside also become shortcuts

6

mac os 10.13.6

android studio 3.2.1

flutter version .11.7-pre.35

Activity

  1. zoechi commented on Nov 19, 2018

    @zoechi
    Contributor

    See also #16036, #16049
    Merging with #16036

  2. Pergius commented on Dec 5, 2018

    @Pergius

    THANK YOU yxmflbb!! I've been pulling my hair out for this the last 2 days! your hotfix atleast got my flutter to work again to run the app in a simulator again!.. many thanx! This issue must be fixed.. I've tried everything up until this strange way.. but it worked.

  3. Rassell commented on Dec 23, 2018

    @Rassell

    Thanks @yxfmlbb!

    Any idea why is this happening?

  4. rgbinnovation commented on Jan 27, 2019

    @rgbinnovation

    This happens over and over. Is there any fix planned for this issue?

  5. MiYogurt commented on May 7, 2019

    @MiYogurt

    cool! 🐂🍺,兄嘚。

  6. corymalcolmtaylor commented on Jun 4, 2019

    @corymalcolmtaylor

    I am getting this error now too but the posted solution does not work for me.

    Launching lib/main.dart on iPhone Xʀ in debug mode...
    Xcode build done. 7.2s
    Failed to build iOS app
    Error output from Xcode build:
    ↳
    ** BUILD FAILED **
    Xcode's output:
    ↳
    === BUILD TARGET shared_preferences OF PROJECT Pods WITH CONFIGURATION Debug ===
    In file included from /Users/me/dev/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.3+1/ios/Classes/SharedPreferencesPlugin.m:5:
    /Users/me/dev/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.3+1/ios/Classes/SharedPreferencesPlugin.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
    ^~~~~~~~~~~~~~~~~~~
    1 error generated.
    Could not build the application for the simulator.
    Error launching application on iPhone Xʀ.
    Exited (sigterm)

    PS: I can build the android version and run on the emulator.

    PPS: I got past this problem by reinstalling flutter and switching to the Beta channel.

  7. rdev-software commented on Feb 8, 2020

    @rdev-software

    Any idea, when some fix is merged to BETA channel ?

  8. github-actions commented on Aug 23, 2021

    @github-actions

    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 flutter doctor -v and a minimal reproduction of the issue.

  9. locked as resolved and limited conversation to collaborators on Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions