简体   繁体   English

Xcode 10 找不到词法或预处理器问题.h 文件

[英]Xcode 10 Lexical or preprocessor issue .h file not found

When using the new Xcode 10 build system under File -> Workspace Settings -> New Build System (Default) my app will not compile because it cannot find ah file for an embedded.framework that I am using in my project.在文件 -> 工作区设置 -> 新构建系统(默认)下使用新的 Xcode 10 构建系统时,我的应用程序将无法编译,因为它找不到我在项目中使用的 embedded.framework 的 ah 文件。 Once I set the build system to use the legacy build system the project builds perfectly fine.一旦我将构建系统设置为使用遗留构建系统,项目就可以完美构建。 How can I use the new build system and fix this issue where it cannot find the.framework.h file?我如何使用新的构建系统并解决找不到 .framework.h 文件的问题? The project builds perfectly fine in Xcode 9.4.1 without issues or when using the legacy build system on Xcode 10.该项目在 Xcode 9.4.1 中构建得非常好,没有问题,或者在 Xcode 10 上使用遗留构建系统时。

I ended up fixing this issue. 我最终解决了这个问题。 What I ended up doing was going to target -> Build settings and changing the Framework search path to an absolute path. 我最终做的是将目标 - >构建设置并将Framework搜索路径更改为绝对路径。

Before my change it was ~/Documents/FrameworkRootFolder now it is /Users/$(USER)/Documents/FrameworkRootFolder and I set it to recursive. 在我改变之前它是〜/ Documents / FrameworkRootFolder现在它是/ Users / $(USER)/ Documents / FrameworkRootFolder并且我将它设置为递归。 Seems to build fine now. 似乎现在建立好。

I also had another issue with multiple apps produce .app error and fixed it with this: In case someone is still struggling with this after updating cocoapods and reinstalling pods: 我还有另一个问题,多个应用程序产生.app错误并修复它:如果有人在更新cocoapods并重新安装pod后仍在努力解决这个问题:

Open Build Phases of the target which gives you problems Open Copy Pods Resources phase. 打开目标的构建阶段,为您提供问题Open Copy Pods Resources阶段。 Make sure the Output Files is empty. 确保输出文件为空。 In my case I had a strange entry ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}. 在我的情况下,我有一个奇怪的条目$ {TARGET_BUILD_DIR} / $ {UNLOCALIZED_RESOURCES_FOLDER_PATH}。 I removed it and the build was successful 我删除它,构建成功

Xcode 10 Error: Multiple commands produce for 'app' and 'appex' Xcode 10错误:为'app'和'appex'生成多个命令

Make sure you run the .xcworkspace XCode file, instead of the .xcodeproj file - so that Pods are loaded as well.确保运行.xcworkspace XCode 文件,而不是.xcodeproj文件 - 这样 Pod 也会被加载。

暂无
暂无

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

相关问题 词法或预处理器问题(Xcode):找不到“Flutter/Flutter.h”文件 - Lexical or Preprocessor Issue (Xcode): 'Flutter/Flutter.h' file not found Xcode -FirebaseCore 词法或预处理器问题“GoogleUtilities/GULAppEnvironmentUtil.h”文件未找到 - Xcode -FirebaseCore Lexical or preprocessor issue 'GoogleUtilities/GULAppEnvironmentUtil.h' file not found 如何修复错误Xcode。 未找到词法预处理器问题Cordova / CDVJpegHeaderWriter.h'文件 - How fix error Xcode. Lexical preprocessor issue Cordova/CDVJpegHeaderWriter.h' file not found 运行应用程序时出现 Flutter ios 错误:词法或预处理器问题(Xcode):找不到“Flutter/Flutter.h”文件 - Flutter ios error when run app: Lexical or Preprocessor Issue (Xcode): 'Flutter/Flutter.h' file not found (UNITY) Xcode 中 IOS 的构建错误 -> -> “词法或预处理器问题” -> 'FBSDKURLSession.h' 文件未找到,FBSDKUserDataStore.h' 文件未找到 - (UNITY) Build error for IOS in Xcode -> -> “Lexical or Preprocessor Issue” -> 'FBSDKURLSession.h' file not found, FBSDKUserDataStore.h' file not found 词法或预处理器问题:找不到“MyViewController.h”文件 - Lexical or preprocessor Issue: 'MyViewController.h' file not Found 找不到词汇或预处理程序问题“ SDWebImage / UIImageView + WebCache.h”文件 - Lexical or preprocessor issue 'SDWebImage/UIImageView+WebCache.h' file not found 未找到词法或预处理器问题'FacebookSDK / FacebookSDK.h'文件 - Lexical or Preprocessor Issue 'FacebookSDK/FacebookSDK.h' file not found 词汇或预处理程序问题错误(找不到UIKit / UIKit.h文件) - Lexical or Preprocessor Issue error (UIKit/UIKit.h file not found) 词汇或预处理器问题。 - “文件未找到。” - Lexical or Preprocessor issue. - “File not found.”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM