error: Multiple commands produce ... x86_64.swiftmodule

error: Multiple commands produce ... x86_64.swiftmodule

我正在将一个旧应用程序从 swift 3 迁移到 swift 4,但遇到了这个错误:

error: Multiple commands produce '/Users/.../Library/Developer/Xcode/DerivedData/ ... /Debug-iphonesimulator/CompassV3.swiftmodule/x86_64.swiftmodule':
1) Target 'CompassV3' (project 'Void Navigator'): Ditto /Users/.../Library/Developer/Xcode/DerivedData/.../Debug-iphonesimulator/CompassV3.swiftmodule/x86_64.swiftmodule /Users/.../Library/Developer/Xcode/DerivedData/Void_Navigator-bogrvoiumgmhfwcpvocwtssiwgpm/Build/Intermediates.noindex/Void Navigator.build/Debug-iphonesimulator/CompassV3.build/Objects-normal/x86_64/CompassV3.swiftmodule
2) Target 'Outdoor Navigator' (project 'Void Navigator'): Ditto /Users/.../Library/Developer/Xcode/DerivedData/.../Debug-iphonesimulator/CompassV3.swiftmodule/x86_64.swiftmodule /Users/.../Library/Developer/Xcode/DerivedData/Void_Navigator-bogrvoiumgmhfwcpvocwtssiwgpm/Build/Intermediates.noindex/Void Navigator.build/Debug-iphonesimulator/Outdoor Navigator.build/Objects-normal/x86_64/CompassV3.swiftmodule

CompassV3 构建应用程序

Outdoor navigator 是一个扩展。

看起来有冲突,但我不知道如何解决。

项目仍在 swift 版本 3 上。

您很可能有两个具有相同产品名称的目标。

你们都可以在项目中定位,转到“构建设置”并检查“打包”部分中 "Product Module Name" 的值吗?