我在pod文件中添加了Fabric和Crashlytics。当我更新pods时,我遇到带有重复符号的链接器错误。我在这里发现它在Fabric.framework和Crashlytics.framework中都有相同的文件,但我怎样才能解决这个问题?
duplicate symbol _CLSMachOEnumerateSlicesAtAddress in:
Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOFileDestroy in:
Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOFileEnumerateSlices in:
Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOFileInitWithPath in:
Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOGetDylibPath in:
Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOGetEncrypted in:
Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOGetLinkedSDKVersion in:
Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOGetMinimumOSVersion in:
Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOGetUUID in:
Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachONormalizeUUID in:
Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOSliceEnumerateLoadCommands in:
Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOSliceGetArchitectureName in:
Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOSliceGetCurrent in:
Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOSliceGetExecutablePath in:
Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOSliceGetUnwindInformation in:
Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOSliceIs64Bit in:
Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOSliceWithHeader in:
Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
ld: 17 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
提前致谢。
答案 0 :(得分:49)
1.删除(并移至垃圾箱)Fabric.framework和任何已安装的Fabric工具包及其相关资源。
在项目中进行清洁和深层清洁(ALT-SHIFT-CMD-K)
将Fabric窗格添加到您的Podfile:pod'Fabric'
在Podfile中为项目正在使用的每个Fabric工具包添加一个pod:pod'Crashlytics'
注意:如果你需要Crashlytics和Answers,你应该只安装pod'Crashlytics',因为Answers包含在Crashlytics中。如果你想要没有Crashlytics的答案,只安装pod'Answers'。
希望能解决您的问题。如果失败,请尝试删除所有窗格并按该顺序再次添加。 祝你好运!