ios – 在Xcode中添加Firebase时如何解决“重复的符号”

前端之家收集整理的这篇文章主要介绍了ios – 在Xcode中添加Firebase时如何解决“重复的符号”前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我无法解决错误“重复的符号”.

错误

duplicate symbol _GSDK_NSClassFromString in: .../Pods/FirebaseCore/Frameworks/FirebaseCore.framework/FirebaseCore(overload_9ea29fd47bf44ee000bc4282b65dac06.o)
 /Pods/GoogleSymbolUtilities/Frameworks/frameworks/GoogleSymbolUtilities.framework/GoogleSymbolUtilities(overload.o)

duplicate symbol _GSDK_objc_getClass in: .../Pods/FirebaseCore/Frameworks/FirebaseCore.framework/FirebaseCore(overload_9ea29fd47bf44ee000bc4282b65dac06.o)
/Pods/GoogleSymbolUtilities/Frameworks/frameworks/GoogleSymbolUtilities.framework/GoogleSymbolUtilities(overload.o)

duplicate symbol _GSDK_objc_getProtocol in:    ...Pods/FirebaseCore/Frameworks/FirebaseCore.framework/FirebaseCore(overload_9ea29fd47bf44ee000bc4282b65dac06.o)
    .../Pods/GoogleSymbolUtilities/Frameworks/frameworks/GoogleSymbolUtilities.framework/GoogleSymbolUtilities(overload.o)

duplicate symbol _GSDK_objc_lookUpClass in:        ...Pods/FirebaseCore/Frameworks/FirebaseCore.framework/FirebaseCore(overload_9ea29fd47bf44ee000bc4282b65dac06.o)
    ...Pods/GoogleSymbolUtilities/Frameworks/frameworks/GoogleSymbolUtilities.framework/GoogleSymbolUtilities(overload.o)

ld: 4 duplicate symbols for architecture arm64
clang: error: linker command Failed with exit code 1 (use -v to see invocation)

我更新并安装了Podfile.但它没有奏效.

Pod文件

target 'game' do

  # Pods for game
  pod 'Firebase'
  pod 'Firebase/AdMob'
end

以前可以添加Firebase.但是当我不小心删除“FirebaseCore.framework”.
之后,我删除了Pods并重新安装了Firebase,但它没有起作用.

我该如何解决

解决方法

我遇到过同样的问题.其他链接器标志中的-all_load标志似乎是导致这一点.

猜你在找的iOS相关文章