我在迅速的項目有一個老班「Approval.swift」的架構ARMv7的錯誤重複的符號
我的核心數據添加NSManagedObject(審批)和我創建NSManagedObject子類具有相同的名稱(Approval.swift)該實體
然後我改變了實體名稱爲「ApprovalObject」和相關的類ApprovalObject.swift從舊的階級區分它「Approval.swift」
,當我試圖運行項目,我得到這個錯誤
duplicate symbol _OBJC_METACLASS_$_Card in: /Users/MyUser/Library/Developer/Xcode/DerivedData/MyProject-czluntwgoefegbeilusmojsyejlc/Build/Intermediates/MyProject.build/Debug-iphoneos/MyProject.build/Objects-normal/armv7/ApprovalObject.o /Users/MyUser/Library/Developer/Xcode/DerivedData/MyProject-czluntwgoefegbeilusmojsyejlc/Build/Intermediates/MyProject.build/Debug-iphoneos/MyProject.build/Objects-normal/armv7/Card.o duplicate symbol _OBJC_CLASS_$_Card in: /Users/MyUser/Library/Developer/Xcode/DerivedData/MyProject-czluntwgoefegbeilusmojsyejlc/Build/Intermediates/MyProject.build/Debug-iphoneos/MyProject.build/Objects-normal/armv7/ApprovalObject.o /Users/MyUser/Library/Developer/Xcode/DerivedData/MyProject-czluntwgoefegbeilusmojsyejlc/Build/Intermediates/MyProject.build/Debug-iphoneos/MyProject.build/Objects-normal/armv7/Card.o
ld: 2 duplicate symbols for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)
有人可以幫我解決這個錯誤嗎? 非常感謝
.h文件我想你補上一兩次。檢查一次我的意思是'ApprovalObject' – Buntylm
@BuntyMadan非常感謝!是的,我檢查了ApprovalObject有一個錯誤 – Maha
酷,它發生!享受 – Buntylm