颤振/致命错误:找不到“颤振/颤振.h”文件

您好,我在运行我的应用程序时遇到此错误。

Failed to build iOS app
Error output from Xcode build:
?
    ** BUILD FAILED **
Xcode's output:
?
    In file included from /Users/daegilpyo/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.7.10/ios/Classes/FLTURLLauncherPlugin.m:7:
    /Users/daegilpyo/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.7.10/ios/Classes/FLTURLLauncherPlugin.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^~~~~~~~~~~~~~~~~~~
    1 error generated.
5
    Command CompileSwift failed with a nonzero exit code
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description
Could not build the precompiled application for the device.

Error launching application on DAEGIL? iPhone.
Exited (sigterm)

这是在我将频道从稳定版更改为主版之后发生的。我不知道为什么会出现此错误。

请告诉我,我在等你帮助..

这是颤振医生 - v

[?] Flutter (Channel stable, 1.22.5, on macOS 11.0.1 20B50 darwin-x64, locale en-CA)
    • Flutter version 1.22.5 at /Users/daegilpyo/Developer/flutter
    • Framework revision 7891006299 (5 days ago), 2020-12-10 11:54:40 -0800
    • Engine revision ae90085a84
    • Dart version 2.10.4

[?] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /Users/daegilpyo/Library/Android/sdk
    • Platform android-29, build-tools 29.0.3
    • Java binary at: /Applications/12.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
    • 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

[?] Android Studio (version 3.6)
    • Android Studio at /Applications/12.app/Contents
    • Flutter plugin version 47.1.1
    • Dart plugin version 192.8052
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[?] Connected device (1 available)
    • DAEGIL? iPhone (mobile) • 00008020-0011243A2279002E • ios • iOS 14.2

• No issues found!

回答

一周前我遇到了这个问题,我ios/Flutter从我的目录中删除了该文件夹并运行了这些命令并更改了deployment target to 11.0

-> flutter create
-> flutter pub cache repair
-> cd ios 
-> pod init 
-> pod install 

遵循这些命令后,我可以在模拟器上构建 iOS 并创建存档。

  • It did not worked for me :/

以上是颤振/致命错误:找不到“颤振/颤振.h”文件的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>