xcode 添加 adMob 时未定义的架构符号
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25950990/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Undefined symbols for architecture when add adMob
提问by user3745888
I'm adding admob to my project, but I get this error:
我正在将 admob 添加到我的项目中,但出现此错误:
Undefined symbols for architecture i386:
架构 i386 的未定义符号:
"_OBJC_CLASS_$_EKEvent", referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADOpener.o)
"_OBJC_CLASS_$_EKEventEditViewController", referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADOpener.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 added:
我已经添加了:
StoreKit
AudioToolbox
MessageUI
SystemConfiguration
CoreGraphics
AdSupport
And also use -ObjC link flags..
并且还使用 -ObjC 链接标志..
What is the problem?
问题是什么?
Thanks!
谢谢!
回答by GMBrian
I just upgraded from Google Admob SDK 6.11 to 6.12 and these same errors popped up.
我刚刚从 Google Admob SDK 6.11 升级到 6.12,并弹出了这些相同的错误。
In the project navigator click on your project properties in the top and make sure the correct target is selected. Go to the Build Phases tab and scroll to Link Binaries With Libraries. Add both EventKit.frameworkand EventKitUI.frameworkto this list.
在项目导航器中单击顶部的项目属性并确保选择了正确的目标。转到 Build Phases 选项卡并滚动到 Link Binaries With Libraries。将EventKit.framework和EventKitUI.framework添加到此列表中。
As always, Clean and Build your project. The errors should go away.
与往常一样,清理并构建您的项目。错误应该消失。
回答by Aemgtz
Please check that you have added all those libraries
请检查您是否已添加所有这些库
- AdSupport
- AudioToolbox
- AVFoundation
- CoreGraphics
- CoreTelephony
- EventKit
- EventKitUI
- MessageUI
- StoreKit
- SystemConfiguration
- 广告支持
- 音频工具箱
- AV基金会
- 核心图形
- 核心电话
- 事件工具包
- 事件套件界面
- 消息界面
- 商店套件
- 系统配置
回答by Deyan Vitanov
I had this issue and for me it was missing MessageUI.framework.
我遇到了这个问题,对我来说它缺少 MessageUI.framework。
This is the most current list of frameworks you need to include for AdMob: (July 2016)
这是您需要为 AdMob 包含的最新框架列表:(2016 年 7 月)
AdSupport.framework,
EventKit.framework,
EventKitUI.framework,
CoreTelephony.framework,
StoreKit.framework,
MessageUI.framework
回答by Ehtesham Hasan
June 5, 2017
2017 年 6 月 5 日
For Google Mobile Ads SDK version 7.20.0 the following frameworks are required.
对于 Google 移动广告 SDK 7.20.0 版,需要以下框架。
- GLKit
- CoreTelephony
- CoreMedia
- CoreVideo
- MessageUI
- CFNetwork
- MobileCoreServices
- GLKit
- 核心电话
- 核心媒体
- 核心视频
- 消息界面
- CF网络
- 移动核心服务
回答by user3745888
I solve this adding EvenKit framework. In SdkiOS 6.12 adMob is necessary this for solve my errors.
我解决了这个添加 EvenKit 框架的问题。在 SdkiOS 6.12 中,adMob 是解决我的错误所必需的。