我正在尝试在 Xcode 中构建我的 Flutter iOS 应用程序,但出现以下错误:
'Flutter/Flutter.h' file not found
failed to emit precompiled header '/Users/user/Library/Developer/Xcode/DerivedData/Runner-bqwgaclmizdztbgwvyuydjgnmjad/Build/Intermediates.noindex/ArchiveIntermediates/Runner/PrecompiledHeaders/Runner-Bridging-Header-swift_3AO5QSACASUGH-clang_24K6MS22YMY0N.pch' for bridging header '/Users/user/development/projects/flutter/project/ios/Runner/Runner-Bridging-Header.h'
in file included from /Users/user/development/projects/flutter/project/ios/Runner/Runner-Bridging-Header.h:1:
我已尝试以下步骤来解决该错误:
我已删除
ios
文件夹并创建了一个新文件夹。
我已在
pod install
文件夹中运行 ios
。
我仍然收到错误。我还能做什么来解决此错误?
附加信息:
颤振版本:3.13.7
Xcode 版本:15.0
flutter doctor -v
命令的输出中没有显示错误:
[✓] Flutter (Channel stable, 3.13.7, on macOS 14.0 23A344 darwin-x64, locale
en-MY)
• Flutter version 3.13.7 on channel stable at
/Users/user/development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 2f708eb839 (10 days ago), 2023-10-09 09:58:08 -0500
• Engine revision a794cf2681
• Dart version 3.1.3
• DevTools version 2.25.0
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
• Android SDK at /Users/user/Library/Android/sdk
• Platform android-34, build-tools 33.0.2
• Java binary at: /Applications/Android
Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
17.0.6+0-17.0.6b829.9-10027231)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15A240d
• CocoaPods version 1.13.0
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build
17.0.6+0-17.0.6b829.9-10027231)
[✓] VS Code (version 1.83.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.74.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-x64 • macOS 14.0 23A344 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 118.0.5993.70
[✓] Network resources
• All expected network resources are available.
• No issues found!
我有同样的问题,所有其他解决方案都不起作用。