duplicate symbols for architecture arm64 (Xcode error)

Merc picture Merc · Aug 22, 2015 · Viewed 12.5k times · Source

I deleted all reference to GoogleMobileAdsSDKiOS-7.1 from my project and added 7.4.1. When I ran app on simulator everything works fine but when running on device I get App Mach-O Linker Error.

 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)

I know this error means I have duplicates of the above but my problem is where in Xcode 6.1 do I find these duplicates so I can delete them? I've looked in info.plist, build settings, can't find any duplicates. Where in Xcode 6.1 are the duplicates located ?

Answer

Kyle Liu picture Kyle Liu · Sep 10, 2015

Try remove the "-ObjC" linker flag from the "Other Linker Flags" section of build settings.