Xcode构建错误 – 多个命令产生.o,目标’ProjectCoreData’具有两次列出的Swift源文件的编译命令

Xcode构建错误 – 多个命令产生.o,目标’ProjectCoreData’具有两次列出的Swift源文件的编译命令,第1张

概述我正在运行xCode版本10.1(10B61),Mojave 10.14(18A391) 搜索在一年多前的Xcode 10中显示了类似的问题,但此后没有问题.去年的解决方案似乎正在转向传统模式,但现在不行.看来存储在我桌面上的源代码与“DerivedData”中的代码冲突,我不知道为什么会突然d出这么随机的代码. 如果我删除Core Data中添加的最后一个模型,我会看到这个问题消失了.当我向另一 我正在运行xCode版本10.1(10B61),Mojave 10.14(18A391)

搜索在一年多前的Xcode 10中显示了类似的问题,但此后没有问题.去年的解决方案似乎正在转向传统模式,但现在不行.看来存储在我桌面上的源代码与“DerivedData”中的代码冲突,我不知道为什么会突然d出这么随机的代码.

如果我删除Core Data中添加的最后一个模型,我会看到这个问题消失了.当我向另一个对象添加关系时,它似乎会触发.这显然是随机的.

关于如何解决这个问题的任何建议,以便我可以发展?

Multiple commands produce '//library/Developer/Xcode/DerivedData/ProjectCoreData-ehjvvgovpitmbcegzopwciptfafr/Build/Intermediates.noindex/ProjectCoreData.build/DeBUG-iphonesimulator/ProjectCoreData.build/Objects-normal/x86_64/Contact+CoreDataClass.o':Target 'ProjectCoreData' (project 'ProjectCoreData') has compile command for Swift source filesTarget 'ProjectCoreData' (project 'ProjectCoreData') has compile command for Swift source files

从日志:

<unkNown>:0: error: filename "Contact+CoreDataClass.swift" used twice: '/Users/<user>/Desktop/ProjectCoreData/Contact+CoreDataClass.swift' and '/Users/<user>/library/Developer/Xcode/DerivedData/ProjectCoreData-ehjvvgovpitmbcegzopwciptfafr/Build/Intermediates.noindex/ProjectCoreData.build/DeBUG-iphonesimulator/ProjectCoreData.build/DerivedSources/CoreDataGenerated/ProjectCoreData/Contact+CoreDataClass.swift'<unkNown>:0: note: filenames are used to distinguish private declarations with the same name<unkNown>:0: error: filename "Contact+CoreDataPropertIEs.swift" used twice: '/Users/<user>/Desktop/ProjectCoreData/Contact+CoreDataPropertIEs.swift' and '/Users/<user>/library/Developer/Xcode/DerivedData/ProjectCoreData-ehjvvgovpitmbcegzopwciptfafr/Build/Intermediates.noindex/ProjectCoreData.build/DeBUG-iphonesimulator/ProjectCoreData.build/DerivedSources/CoreDataGenerated/ProjectCoreData/Contact+CoreDataPropertIEs.swift'<unkNown>:0: note: filenames are used to distinguish private declarations with the same nameCommand /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc Failed with exit code 1
解决方法 根据这个 What’s new in Core Data

这是解决方案的图片:

总结

以上是内存溢出为你收集整理的Xcode构建错误 – 多个命令产生.o,目标’ProjectCoreData’具有两次列出的Swift源文件的编译命令全部内容,希望文章能够帮你解决Xcode构建错误 – 多个命令产生.o,目标’ProjectCoreData’具有两次列出的Swift源文件的编译命令所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1003411.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-22
下一篇 2022-05-22

发表评论

登录后才能评论

评论列表(0条)

保存