架构 armv7 的未定义符号:“_OBJC_CLASS_$_GGLContext",引用自:AppDelegate.o 中的 objc-class-ref [英] Undefined symbols for architecture armv7: "_OBJC_CLASS_$_GGLContext", referenced from: objc-class-ref in AppDelegate.o

查看:33
本文介绍了架构 armv7 的未定义符号:“_OBJC_CLASS_$_GGLContext",引用自:AppDelegate.o 中的 objc-class-ref的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的 iSO 应用程序中添加 Google Analytics,并且我正在使用 Google Analytics 最新的 SDKhttps://developers.google.com/analytics/devguides/collection/ios/v3/.

I am trying to add Google Analytics in my iSO app and I am using Google Analytics latest SDK https://developers.google.com/analytics/devguides/collection/ios/v3/.

已成功将所有必需的头文件和框架添加到我的项目中.但是在运行我的应用程序时,我遇到了以下错误

Added all required header and frameworks to my project successfully. But while running my app I am getting below errors

  1. (null): "_OBJC_CLASS_$_GGLContext",引用自:AppDelegate.o 中的objc-class-ref

  1. (null): "_OBJC_CLASS_$_GGLContext", referenced from:objc-class-ref in AppDelegate.o

(null):链接器命令失败,退出代码为 1(使用 -v 查看调用)

(null): Linker command failed with exit code 1 (use -v to see invocation)

下面是我在 AppDelegate.m 文件中写的代码

Below is the code which I am writtig in AppDelegate.m file

// Configure tracker from GoogleService-Info.plist.
NSError *configureError;
[[GGLContext sharedInstance] configureWithError:&configureError];
NSAssert(!configureError, @"Error configuring Google services: %@", configureError);

// Optional: configure GAI options.
GAI *gai = [GAI sharedInstance];
gai.trackUncaughtExceptions = YES;  // report uncaught exceptions
gai.logger.logLevel = kGAILogLevelVerbose;  // remove before app release

还包括(_OBJC_CLASS_$_GIDSignInButton 和_OBJC_CLASS_$_GIDSignIn)请告诉我缺少什么.提前致谢.

Also includes (_OBJC_CLASS_$_GIDSignInButton and _OBJC_CLASS_$_GIDSignIn) Please tell what I am missing. Thanks in advance.

推荐答案

OPN [Debug] 目标覆盖了 OTHER_LDFLAGS 构建设置".这是主要问题.在其他链接器标志的新行中添加 $(inherited) 解决了我的问题.

"The OPN [Debug] target overrides the OTHER_LDFLAGS build setting". This was the main issue. After adding $(inherited) in new line in other linker flags solved my issue.

这篇关于架构 armv7 的未定义符号:“_OBJC_CLASS_$_GGLContext",引用自:AppDelegate.o 中的 objc-class-ref的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆