找不到 CocoaLumberjack.h 文件? [英] CocoaLumberjack.h file not found?
问题描述
实际上,我的项目确实可以为 iPhone 6s 编译,但不能为任何 iOS 模拟器编译.当我想为模拟器构建时,我收到两个构建时间错误.
错误
'CocoaLumberjack/CocoaLumberjack.h' 文件未找到
和
未能发出预编译头'/DerivedData/Project/Build/Intermediates.noindex/PrecompiledHeaders/Bridging-Header-swift.pch'用于桥接标题'/Users/Development/ProjectMobile/Views/Project-Bridging-Header.h'
我还尝试了什么?
pod deintegrate
,清除Build,删除DerivedData",pod install
和pod update
- 打开
Project.xcworkspace
而不是Project.xcodeproj
- 在
podfile
中保持目标 iOS 版本和部署目标相同(iOS 12) - 检查框架搜索路径";在目标构建设置
(2) 标题搜索路径
解决方案Xcode 无法为 iOS 模拟器构建项目,因为没有为模拟器设置有效的 CPU 架构(分别为马克).
在<代码>项目>下目标 >用户定义VALID_ARCHS 只有
armv7
、armv7s
和arm64
架构集.我在
VALID_ARCHS
中添加了x86_64
架构,现在工作正常.Actually my project does compile for an iPhone 6s but not for any iOS simulators. When I want to build for a simulator I get two build time errors.
Errors'CocoaLumberjack/CocoaLumberjack.h' file not found
and
failed to emit precompiled header '/DerivedData/Project/Build/Intermediates.noindex/PrecompiledHeaders/Bridging-Header-swift.pch' for bridging header '/Users/Development/ProjectMobile/Views/Project-Bridging-Header.h'
What have I tried yet?
pod deintegrate
, clear Build, delete "DerivedData",pod install
andpod update
- open
Project.xcworkspace
instead ofProject.xcodeproj
- keep target iOS version in
podfile
and deployment target the same (iOS 12) - check "Framework Search Paths" at targets build settings 1
- check "Header Search paths" 2
I am not 100% sure if the paths are correct. And I am wondering that Xcode can't find
Cocoalumberjack.h
, because I can find it under/Pods/CocoaLumberjack/Sources/CocoaLumberjack/Supporting Files/CocoaLumberjack.h
.Questions
Are these paths probably incorrect?
What else could be the problem?I am happy for every serious answer!
(1) Framework Search Paths
(2) Header Search paths
解决方案Xcode couldn't build the project for an iOS simulator because there was no valid CPU architecture set for the simulator (respectively for the Mac).
Under
Project > Targets > User-Defined > VALID_ARCHS
there were justarmv7
,armv7s
andarm64
architectures set.I added
x86_64
architecture to theVALID_ARCHS
and it works fine now.这篇关于找不到 CocoaLumberjack.h 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!