简体   繁体   English

admob集成中的可达性错误

[英]Reachability error in integration of admob

I am trying to integrate admob in my ios application but I am getting following errors when I add sdk and build it.我正在尝试将 admob 集成到我的 ios 应用程序中,但是当我添加 sdk 并构建它时出现以下错误。

Undefined symbols for architecture i386:
  "_SCNetworkReachabilityCreateWithName", referenced from:
      -[GADNetworkChecker startNetworkChecking] in libGoogleAdMobAds.a(GADNetworkChecker.o)
  "_SCNetworkReachabilityScheduleWithRunLoop", referenced from:
      -[GADNetworkChecker startNetworkChecking] in libGoogleAdMobAds.a(GADNetworkChecker.o)
  "_SCNetworkReachabilitySetCallback", referenced from:
      -[GADNetworkChecker startNetworkChecking] in libGoogleAdMobAds.a(GADNetworkChecker.o)
  "_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from:
      -[GADNetworkChecker stopNetworkChecking] in libGoogleAdMobAds.a(GADNetworkChecker.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have included all required framework including SystemConfiguration, CFNetwork etc.我已经包含了所有必需的框架,包括 SystemConfiguration、CFNetwork 等。

Update更新

I am getting this error when I build in simulator but not when I build with device.我在模拟器中构建时出现此错误,但在使用设备构建时却没有。 is it sdk issue?是sdk问题吗? I am using simulator 5.1.我正在使用模拟器 5.1。

Make sure that the frameworks that you added are correctly linked under the "Link Binary With Libraries" section of your Build Settings.确保您添加的框架在构建设置的“Link Binary With Libraries”部分下正确链接。 Also, look at "Compile Sources" under "Build Phases" to make sure all of the relevant files you want to compile are there.另外,查看“构建阶段”下的“编译源”以确保您要编译的所有相关文件都在那里。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM