Flutter: fatal error: 'Flutter/Flutter.h' file not found
Flutter: fatal error: 'Flutter/Flutter.h' file not found
Xcode's output: ↳
In file included from /Users/dani/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-6.0.3/ios/Classes/FLTURLLauncherPlugin.m:7:
/Users/dani/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-6.0.3/ios/Classes/FLTURLLauncherPlugin.h:5:9:
fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
In file included from /Users/dani/development/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-2.0.5/ios/Classes/FLTSharedPreferencesPlugin.m:5:
/Users/dani/development/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-2.0.5/ios/Classes/FLTSharedPreferencesPlugin.h:5:9:
fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
Command CompileSwift failed with a nonzero exit code
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
扑博士:
[✓] Flutter (Channel stable, 2.0.5, on macOS 11.2.3 20D91
darwin-x64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android
SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] Connected device (3 available)
• No issues found!
我尝试了这里提出的所有解决方案,但没有成功:
https://github.com/flutter/flutter/issues/16036
所有依赖项已更新
我相信你应该尝试这两个步骤:
1- 尝试删除 pod 文件并通过执行重新安装它们:
$ cd ios/
$ pod deintegrate
$ pod install
2- 通过在项目的根目录上执行命令来清理工作区:
$ flutter clean
然后再次尝试 运行 应用程序。
这是在我们的应用程序中找到一个不支持空安全的库的问题。识别后我们可以做几件事:
- 询问其回购以获得对空安全的支持
- 使用支持此功能的其他库
- 尝试自己修复
计算器。com/a/33509278/4858133
Xcode's output: ↳ In file included from /Users/dani/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-6.0.3/ios/Classes/FLTURLLauncherPlugin.m:7: /Users/dani/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-6.0.3/ios/Classes/FLTURLLauncherPlugin.h:5:9: fatal error: 'Flutter/Flutter.h' file not found #import <Flutter/Flutter.h> ^~~~~~~~~~~~~~~~~~~ 1 error generated. In file included from /Users/dani/development/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-2.0.5/ios/Classes/FLTSharedPreferencesPlugin.m:5: /Users/dani/development/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-2.0.5/ios/Classes/FLTSharedPreferencesPlugin.h:5:9: fatal error: 'Flutter/Flutter.h' file not found #import <Flutter/Flutter.h> ^~~~~~~~~~~~~~~~~~~ 1 error generated. Command CompileSwift failed with a nonzero exit code 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
扑博士:
[✓] Flutter (Channel stable, 2.0.5, on macOS 11.2.3 20D91
darwin-x64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android
SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] Connected device (3 available)
• No issues found!
我尝试了这里提出的所有解决方案,但没有成功: https://github.com/flutter/flutter/issues/16036
所有依赖项已更新
我相信你应该尝试这两个步骤:
1- 尝试删除 pod 文件并通过执行重新安装它们:
$ cd ios/
$ pod deintegrate
$ pod install
2- 通过在项目的根目录上执行命令来清理工作区:
$ flutter clean
然后再次尝试 运行 应用程序。
这是在我们的应用程序中找到一个不支持空安全的库的问题。识别后我们可以做几件事:
- 询问其回购以获得对空安全的支持
- 使用支持此功能的其他库
- 尝试自己修复
计算器。com/a/33509278/4858133