【发布时间】:2021-03-06 18:02:38
【问题描述】:
我正在用 Flutter 开发应用程序,
我收到致命错误:'Flutter/Flutter.h' file not found ,当我构建我的应用程序时出现此错误。
我尝试重新安装 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
【问题讨论】:
-
如果我创建新项目并运行它,它工作正常...
标签: flutter