简体   繁体   English

词法或预处理器问题(Xcode):找不到“Flutter/Flutter.h”文件

[英]Lexical or Preprocessor Issue (Xcode): 'Flutter/Flutter.h' file not found

I'm working on a project of a team and get this error when i try to debug.我正在处理一个团队的项目,并在尝试调试时收到此错误。

My flutter doctor found no issue and I am not familiar with the code since I get the project repo from someone else.我的flutter doctor没有发现任何问题,而且我不熟悉代码,因为我从其他人那里获得了项目 repo。

Launching lib/main.dart on iPhone 13 in debug mode...
lib/main.dart:1
Xcode build done.                                            1.8s
Failed to build iOS app
Error output from Xcode build:
↳
    objc[52692]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x21604eb90) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1079642c8). One of the two will be used. Which one is undefined.
    objc[52692]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x21604ebe0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x107964318). One of the two will be used. Which one is undefined.
    ** BUILD FAILED **
Xcode's output:
↳
    Writing result bundle at path:
        /var/folders/v_/6mfr50g51js_jftp_690pynr0000gn/T/flutter_tools.JycZbC/flutter_ios_build_temp_dirAePF6Z/temporary_xcresult_bundle
In file included from /Users/furkansuren/FlutterDev/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FLTWKNavigationDelegate.m:5:
/Users/furkansuren/FlutterDev/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FLTWKNavigationDelegate.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^~~~~~~~~~~~~~~~~~~
    1 error generated.
In file included from /Users/furkansuren/FlutterDev/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FLTCookieManager.m:5:
/Users/furkansuren/FlutterDev/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FLTCookieManager.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^~~~~~~~~~~~~~~~~~~
    1 error generated.
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in dependency order
    Result bundle written to path:
        /var/folders/v_/6mfr50g51js_jftp_690pynr0000gn/T/flutter_tools.JycZbC/flutter_ios_build_temp_dirAePF6Z/temporary_xcresult_bundle
Lexical or Preprocessor Issue (Xcode): 'Flutter/Flutter.h' file not found
/Users/furkansuren/FlutterDev/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FLTWKNavigationDelegate.h:4:8
2

Lexical or Preprocessor Issue (Xcode): 'Flutter/Flutter.h' file not found
/Users/furkansuren/FlutterDev/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FLTCookieManager.h:4:8
2

Could not build the application for the simulator.
Error launching application on iPhone 13.
Exited (sigterm)

EDIT:编辑:
After I deleted the derived data and tried: flutter clean > flutter pub get > cd ios > pod install > pod update and try to build the app again, i get the same error.在我删除派生数据并尝试: flutter clean > flutter pub get > cd ios > pod install > pod update并尝试再次构建应用程序后,我得到了同样的错误。

Ran into this issue myself, all SO answers seem to point towards cleaning, pod install,... The correct answer is buried deep in the Flutter我自己遇到了这个问题,所有 SO 答案似乎都指向清洁,pod install,......正确的答案深埋在 Flutter

However, this is caused by the checkbox "For install builds only" on the "Run Script" inside of the Xcode project Build Phases for the target Runner.但是,这是由目标 Runner 的 Xcode 项目 Build Phases 内的“Run Script”上的“For install builds only”复选框引起的。 This needs to be unselected .这需要取消选择

https://github.com/flutter/flutter/issues/99387#issuecomment-1081238267 https://github.com/flutter/flutter/issues/99387#issuecomment-1081238267

运行脚本上的复选框

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 运行应用程序时出现 Flutter ios 错误:词法或预处理器问题(Xcode):找不到“Flutter/Flutter.h”文件 - Flutter ios error when run app: Lexical or Preprocessor Issue (Xcode): 'Flutter/Flutter.h' file not found 如何解决 xcode 中找不到的“Flutter/Flutter.h”文件 - how to slove 'Flutter/Flutter.h' file not found in xcode Xcode 13 &amp; Flutter 2.5.1 - 致命错误:找不到“Flutter/Flutter.h”文件#import<Flutter/Flutter.h> - Xcode 13 & Flutter 2.5.1 - fatal error: 'Flutter/Flutter.h' file not found #import <Flutter/Flutter.h> &#39;Flutter/Flutter.h&#39; 文件未找到,错误 - 'Flutter/Flutter.h' file not found, error 找不到“Flutter/Flutter.h”文件 - 'Flutter/Flutter.h' file not found Xcode 10 找不到词法或预处理器问题.h 文件 - Xcode 10 Lexical or preprocessor issue .h file not found Flutter ios 错误:未找到 Flutter/Flutter.h Xcode 13 - Flutter ios error : Flutter/Flutter.h not found Xcode 13 致命错误:找不到“Flutter/Flutter.h”文件#import<flutter flutter.h> 2022年</flutter> - fatal error: 'Flutter/Flutter.h' file not found #import <Flutter/Flutter.h> on 2022 GeneratedPluginRegistrant.h:10:9: 找不到“Flutter/Flutter.h”文件 - GeneratedPluginRegistrant.h:10:9: 'Flutter/Flutter.h' file not found 致命错误:在 flutter 中找不到“Flutter/Flutter.h”文件 - fatal error: 'Flutter/Flutter.h' file not found in flutter
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM