我正试图在iPad Mini Retina上测试Admob Banner.现在我收到这个错误:
体系结构arm64的未定义符号:
"_SCNetworkReachabilityCreateWithAddress",引用自:l002,在libGoogleAdMobAds.a(GADGestureUtil.o)"_AudioServicesPlaySystemSound"中,引自: - [GADDefaultGMSGHandler didReceiveVibrateNotification:]在libGoogleAdMobAds.a(GADDefaultGMSGHandler.o)中
"_AudioSessionInitialize",引用来自:[GADDevice audioRouteUsingAudioToolkit]在libGoogleAdMobAds.a(GADDevice.o)"_ OBJC_CLASS _ $ _ AVAudioSession"中,引用自:objc-class-ref in libGoogleAdMobAds.a(GADDevice.o)"_ AVAudioSessionPortHeadphones",引用自: - [GADDevice audioRouteUsingAVAudioSession [GADDevice audioRouteUsingAudioToolkit]在的libGoogleAdMobAds.a(GADDevice.o) - :]在的libGoogleAdMobAds.a(GADDevice.o) "_AudioSessionGetProperty",从引用的
"_OBJC_CLASS _ $ _ MFMailComposeViewController",从引用:在的libGoogleAdMobAds.a objc级-REF( GADOpener.o)"_SCNetworkReachabilityGetFlags",引自:libGoogleAdMobAds.a(GADGestureUtil.o)中的l002"_SCNetworkReach abilitySetCallback",引自: - [GADNetworkChecker startNetworkChecking]在libGoogleAdMobAds.a(GADNetworkChecker.o)
"_ OBJC_CLASS _ $ _ MFMessageComposeViewController",引用自:objc-class-ref in libGoogleAdMobAds.a(GADOpener.o)"_AVAudioSessionPortBuiltInSpeaker",引自: - 在libGoogleAdMobAds.a(GADDevice.o)中的[GADDevice audioRouteUsingAVAudioSession]
"_OBJC_CLASS _ $ _ SKStoreProductViewController",引用自:libGoogleAdMobAds.a中的objc-class-ref(GADOpener.o)"_SCNetworkReachabilityScheduleWithRunLoop",引用自: - [GADNetworkChecker startNetworkChecking] in libGoogleAdMobAds.a(GADNetworkChecker.o)
"_ OBJC_CLASS _ $ _ CTTelephonyNetworkInfo",引用自:libGoogleAdMobAds.a中的objc-class-ref(GADDevice.o)"_SCNetworkReachabilityUnscheduleFromRunLoop",引用自: - [GADNetworkChecker stopNetworkChecking]在libGoogleAdMobAds.a(GADNetworkChecker. o)
"_SCNetworkReachabilityCreateWithName",引用自: - libGoo中的[GADNetworkChecker startNetworkChecking] gleAdMobAds.a(GADNetworkChecker.o)
"_SKStoreProductParameterITunesItemIdentifier",从参考: - [GADOpener openInAppStore:fallbackURLString:]在的libGoogleAdMobAds.a(GADOpener.o)LD:符号(多个)未找到架构arm64铛:错误:接头命令失败退出代码1(使用-v查看调用)
我找到了一个消除一些错误的解决方案.它是添加一些框架.清单:
AudioToolbox.Framework
MessageUI.Framework
SystemConfiguration.Framework
CoreGraphics.Framework
CoreData.Framework
AdSupport.framework程式
MediaPlayer.framework
但无论如何我有这个错误:
架构arm64的未定义符号:
"_ OBJC_CLASS _ $ _ AVAudioSession",引用自:libGoogleAdMobAds.a(GADDevice.o)中的objc-class-ref"_AVAudioSessionPortBuiltInSpeaker",引用自: - [... GADDevice audioRouteUsingAVAudioSession] in libGoogleAdMobAds.a(GADDevice.o)
"_OBJC_CLASS _ $ _ CTTelephonyNetworkInfo",引用自:libGoogleAdMobAds.a(GADDevice.o)中的objc-class-ref"_AVAudioSessionPortHeadphones",引用自: - [GADDevice audioRouteUsingAVAudioSession] in libGoogleAdMobAds.a(GADDevice.o)
"_ OBJC_CLASS _ $ _ SKStoreProductViewController",引用自:libGoogleAdMobAds.a中的objc-class-ref(GADOpener.o)"_SKStoreProductParameterITunesItemIdentifier",引用自: - 在libGoogleAdMobAds.a中的[GADOpener openInAppStore:fallbackURLString:](GADOpener.o)ld:找不到符号体系结构arm64 clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)
如何解决这个问题?
只需添加以下框架BuildSettings - > Build Phase - > Link Binary with libraries
StoreKit.framework CoreTelephony.framework AVFoundation.framework