当我尝试构建我的iOS时,我面临这样的错误,我认为这主要是与webview_flutter包
Failed to build iOS app
Error output from Xcode build:
↳
In file included from /Users/Development/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-2.0.14/ios/Classes/JavaScriptChannelHandler.m:5:
/Users/Development/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-2.0.14/ios/Classes/JavaScriptChannelHandler.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
In file included from /Users/Development/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-2.0.14/ios/Classes/FLTWebViewFlutterPlugin.m:5:
/Users/Development/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-2.0.14/ios/Classes/FLTWebViewFlutterPlugin.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.```
是否删除了XCode构建缓存?
在这种情况下,可以通过覆盖之前提交的ios文件夹或删除其中所有自动生成的文件来轻松解决。
在终端中打开项目文件夹,运行flutter build ios
.