问题描述
我刚开始用环信,原来项目同时使用MiPush,当Other Linker Flags 只包含-ObjC时有如下错误:duplicate symbol _OBJC_CLASS_$_XMPPElement in: [$Project]/Lighting/3rdParty/EaseMobSDK/lib/libEaseMobClientSDK.a(XMPPElement.o) [$Project]/Lighting/3rdParty/MiSDK/libMiPushSDK.a(XMPPElement.o)duplicate symbol _OBJC_METACLASS_$_XMPPElement in: [$Project]/Lighting/3rdParty/EaseMobSDK/lib/libEaseMobClientSDK.a(XMPPElement.o) [$Project]/Lighting/3rdParty/MiSDK/libMiPushSDK.a(XMPPElement.o)duplicate symbol _OBJC_IVAR_$_DDListEnumerator.numElements in: [$Project]/Lighting/3rdParty/EaseMobSDK/lib/libEaseMobClient...当增加-force_load时[模拟器下]Undefined symbols for architecture x86_64: "webrtc::FIRFilterSSE2::FIRFilterSSE2(float const*, unsigned long, unsigned long)", referenced from: webrtc::FIRFilter::Create(float const*, unsigned long, unsigned long) in libEaseMobClientSDK.a(fir_filter.o)[真机下]duplicate symbol _WebRtcNsx_Create in: [$Project]/3rdParty/EaseMobSDK/lib/libEaseMobClientSDK.a(noise_suppression_x.o)duplicate symbol _WebRtcNsx_Free in: [$Project]/3rdParty/EaseMobSDK/lib/libEaseMobClientSDK.a(noise_suppression_x.o)duplicate symbol _WebRtcNsx_Init in: [$Project]/3rdParty/EaseMobSDK/lib/libEaseMobClientSDK.a(noise_suppression_x.o)...duplicate symbol _OBJC_CLASS_$_XMPPElement in: [$Project]/3rdParty/EaseMobSDK/lib/libEaseMobClientSDK.a(XMPPElement.o) [$Project]/3rdParty/MiSDK/libMiPushSDK.a(XMPPElement.o)duplicate symbol _OBJC_METACLASS_$_XMPPElement in: [$Project]/3rdParty/EaseMobSDK/lib/libEaseMobClientSDK.a(XMPPElement.o) [$Project]/3rdParty/MiSDK/libMiPushSDK.a(XMPPElement.o)duplicate symbol _OBJC_IVAR_$_DDListEnumerator.numElements in: [$Project]/3rdParty/EaseMobSDK/lib/libEaseMobClientSDK.a(DDList.o) [$Project]/3rdParty/MiSDK/libMiPushSDK.a(DDList.o)... 以上情况如何处理,谢谢
解决方案
项目中有用到实时语音和实时视频吗?
解决方案二:
暂时没用到,但是使用Lite版本仍有duplicate symbol _OBJC_CLASS_$_XMPPElement类型的错误
解决方案三:
lite版 other linker 改成force_load
解决方案四:
other linker 截图看下
解决方案五:
解决方案六:
您这小米推送的SDK与我们环信SDK,XMPPElement.o部分有重复,您可以对这个文件处理一下,或者换其他推送试试。