我正在用flutter开发应用程序,
我收到致命错误:'Flutter/Flutter.h‘文件找不到,当我构建我的应用程序时,这个错误。
我试过重新安装cocoapod删除podfile.lock然后重新安装
但是我仍然得到这个错误..
我能为这个错误做些什么呢?
daegilpyo@DAEGILs-MacBook-Pro eminail % flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.4, on macOS 11.0.1 20B50 darwin-x64, locale en-CA)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
[✓] Android Studio (version 3.6)
[✓] Connected device (1 available)
• No issues found!
daegilpyo@DAEGILs-MacBook-Pro eminail %
vent sent after app closed: {id: 0, progressId: null, finished: true}
Launching lib/main.dart on DAEGIL의 iPhone in debug mode...
lib/main.dart:1
Automatically signing iOS for device deployment using specified development team in Xcode project: T6ULPGT4J7
Xcode build done. 18.9s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
Command CompileSwift failed with a nonzero exit code
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.
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
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发布于 2020-11-24 08:13:59
进入终端,备份你的ios/Runner文件夹,然后删除你的ios文件夹。然后转到终端并执行
cd path/to/your/project/projectName
flutter create .
flutter run如果颤动运行失败
cd ios
pod install
cd ..
flutter runhttps://stackoverflow.com/questions/64978304
复制相似问题