Admob ios x64错误

我正试图在iPad Mini Retina上测试Admob Banner.现在我收到这个错误

Undefined symbols for architecture arm64:
“_SCNetworkReachabilityCreateWithAddress”,referenced from:
l002 in libGoogleAdMobAds.a(GADGestureUtil.o) “_AudioServicesPlaySystemSound”,referenced from:
-[GADDefaultGMSGHandler didReceiveVibrateNotification:] in libGoogleAdMobAds.a(GADDefaultGMSGHandler.o)
“_AudioSessionInitialize”,referenced from:
-[GADDevice audioRouteUsingAudioToolkit] in libGoogleAdMobAds.a(GADDevice.o) “_OBJC_CLASS_$_AVAudioSession”,
referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADDevice.o) “_AVAudioSessionPortHeadphones”,referenced from:
-[GADDevice audioRouteUsingAVAudioSession] in libGoogleAdMobAds.a(GADDevice.o) “_AudioSessionGetProperty”,
referenced from:
-[GADDevice audioRouteUsingAudioToolkit] in libGoogleAdMobAds.a(GADDevice.o)
“_OBJC_CLASS_$_MFMailComposeViewController”,referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADOpener.o) “_SCNetworkReachabilityGetFlags”,referenced from:
l002 in libGoogleAdMobAds.a(GADGestureUtil.o) “_SCNetworkReachabilitySetCallback”,referenced from:
-[GADNetworkChecker startNetworkChecking] in libGoogleAdMobAds.a(GADNetworkChecker.o)
“_OBJC_CLASS_$_MFMessageComposeViewController”,referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADOpener.o) “_AVAudioSessionPortBuiltInSpeaker”,referenced from:
-[GADDevice audioRouteUsingAVAudioSession] in libGoogleAdMobAds.a(GADDevice.o)
“_OBJC_CLASS_$_SKStoreProductViewController”,referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADOpener.o) “_SCNetworkReachabilityScheduleWithRunLoop”,referenced from:
-[GADNetworkChecker startNetworkChecking] in libGoogleAdMobAds.a(GADNetworkChecker.o)
“_OBJC_CLASS_$_CTTelephonyNetworkInfo”,referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADDevice.o) “_SCNetworkReachabilityUnscheduleFromRunLoop”,referenced from:
-[GADNetworkChecker stopNetworkChecking] in libGoogleAdMobAds.a(GADNetworkChecker.o)
“_SCNetworkReachabilityCreateWithName”,referenced from:
-[GADNetworkChecker startNetworkChecking] in libGoogleAdMobAds.a(GADNetworkChecker.o)
“_SKStoreProductParameterITunesItemIdentifier”,referenced from:
-[GADOpener openInAppStore:fallbackURLString:] in libGoogleAdMobAds.a(GADOpener.o) ld: symbol(s) not found for
architecture arm64 clang: error: linker command Failed with exit code
1 (use -v to see invocation)

我找到了一个消除一些错误解决方案.它是添加一些框架.清单:

> AudioToolBox.Framework
> MessageUI.Framework
> SystemConfiguration.Framework
> CoreGraphics.Framework
> CoreData.Framework
> AdSupport.Framework
> MediaPlayer.framework

但无论如何我有这个错误

Undefined symbols for architecture arm64:
“_OBJC_CLASS_$_AVAudioSession”,referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADDevice.o) “_AVAudioSessionPortBuiltInSpeaker”,referenced from:
-[GADDevice audioRouteUsingAVAudioSession] in libGoogleAdMobAds.a(GADDevice.o)
“_OBJC_CLASS_$_CTTelephonyNetworkInfo”,referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADDevice.o) “_AVAudioSessionPortHeadphones”,referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADOpener.o) “_SKStoreProductParameterITunesItemIdentifier”,referenced from:
-[GADOpener openInAppStore:fallbackURLString:] in libGoogleAdMobAds.a(GADOpener.o) ld: symbol(s) not found for
architecture arm64 clang: error: linker command Failed with exit code
1 (use -v to see invocation)

如何解决这个问题?

解决方法

只需添加以下框架BuildSettings – >构建阶段 – > Link Binary与库
StoreKit.framework
CoreTelephony.framework
AVFoundation.framework

相关文章

背景 前端时间产品经理决定使用百度统计,使得 工程B 中原统计sdk-友盟统计,需要被去除。之前尝试去除...
结论: alloc负责分配内存和创建对象对应的isa指针; init只是返回alloc生成的对象。 所以alloc后,多次...
更新 如果UI愿意把启动图切割成n份,按一定约束在launchscreen.storyboard中进行排版,启动图效果会更好...
最近在看一本书《Effective OC 2.0》,今天看到有个tip是OC适中循环各自优劣性,作者最终推荐此块循环。...
// // ViewController.m // paintCodeTestOC //gif // Created by LongMa on 2019/7/25. // #import &a...
背景介绍 一般情况下,出于省电、权限、合理性等因素考虑,给人的感觉是很多奇怪的需求安卓可以实现,但...