我正在运行xCode版本10.1(10B61),Mojave 10.14(18A391)
搜索显示,与一年前相比,Xcode 10中存在类似的问题,但此后没有任何问题。去年的解决方案似乎正在切换到传统模式,但是现在不起作用。看来,存储在桌面上的源代码与“ DerivedData”中的代码冲突,我不确定为什么它会突然随机弹出。
如果我删除了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 files
Target '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 name
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1
答案 0 :(得分:36)
答案 1 :(得分:1)