重复的符号架构arm64(Xcode错误)

我从我的项目中删除了所有对GoogleMobileAdsSDKiOS-7.1的引用,并添加了7.4.1。 当我在模拟器上运行应用程序一切正常,但在设备上运行时,我得到应用程序Mach-O链接器错误。

duplicate symbol l017 in: /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS- 7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADAdNetworkJavaScriptAdViewDelegate.o) /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADRewardBasedVideoAd+Mediation.o) duplicate symbol l018 in: /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADMRAIDPicture.o) /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADRewardBasedVideoAd+Mediation.o) duplicate symbol l016 in: /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADBannerAdViewDelegate.o) /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADAdAppViewController.o) duplicate symbol l021 in: /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADLocation.o) /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADNativeAdAttribution.o) duplicate symbol l016 in: /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADBannerAdViewDelegate.o) /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADNativeAdImage.o) duplicate symbol l005 in: /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADMWebViewRenderedChecker.o) /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADAdViewRenderedChecker.o) duplicate symbol l006 in: /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADMWebViewRenderedChecker.o) /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADAdViewRenderedChecker.o) duplicate symbol l012 in: /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADPinger.o) /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADCSIReporter.o) duplicate symbol l016 in: /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADBannerAdViewDelegate.o) /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADAdNetworkJavaScriptAdViewDelegate.o) duplicate symbol l021 in: /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADLocation.o) /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADMRAIDResizeProperties.o) ld: 21 duplicate symbols for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) 

我知道这个错误意味着我有上面的重复,但我的问题是在Xcode 6.1的地方,我发现这些重复,所以我可以删除它们? 我看了info.plist,build立设置,找不到任何重复。 在Xcode 6.1中的重复位置?

尝试从构build设置的“其他链接器标志”部分删除“-ObjC”链接器标志。

有同样的问题,这里是我如何“解决”它:简单地放弃7.4.1

如果您回到以前的版本,问题就会消失: https : //dl.google.com/googleadmobadssdk/googlemobileadssdkios-7.3.1.zip

我不知道我做错了什么,但是我会大胆地猜测,把这个责任归咎于Google。 很可能没有人对这个框架的arm64构build进行testing。

无论我花了多less时间来调整它,它总是会失败,而由于某种原因,32位版本可以正常工作。

既然你需要32位和64位工作才能将ipa推到iTunes商店,那么我们就必须使用以前的版本。

希望这会挽救我不得不经历的其他痛苦。

我有一种感觉,不知何故,除了新版本之外,还有旧的框架链接到你的应用程序中,但我不确定。 看看构build日志,看看有什么确切的ld命令被用来连接在一起。