使用Cocoa Pods导入Google Analytics iOS SDK时出错 [英] Error importing Google Analytics iOS SDK using Cocoa Pods

查看:78
本文介绍了使用Cocoa Pods导入Google Analytics iOS SDK时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我直接导入了Google Analytics(分析)iOS SDK,一切正常.然后,我开始使用可可豆荚来管理所有外部库并收到此错误.

At first I imported Google Analytics iOS SDK directly and everything worked. Then I started using cocoa pods to manage all of my external libraries and getting this error.

Undefined symbols for architecture i386:
"_OBJC_CLASS_$_GAI", referenced from:
  objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

看起来像可可豆没有导入所需的库?

Looks like Cocoa Pods isn't importing required libraries?

推荐答案

事实证明,在某些情况下,可能有必要将库手动导入到项目中.就我而言,我必须将libGoogleAnalyticsServices.a放到Build Phases中.只需在finder中找到.a文件,然后将其放入项目中即可.

As it turned out in some cases it might be necessary to manually import library into the project. In my case I had to drop libGoogleAnalyticsServices.a into Build Phases. Just locate .a file in finder and drop it into the project.

有关更多详细信息,请参见 https://github.com/CocoaPods/CocoaPods/issues/225 https://github.com/CocoaPods/CocoaPods/issues/844 .

For more details see https://github.com/CocoaPods/CocoaPods/issues/225 and https://github.com/CocoaPods/CocoaPods/issues/844.

这篇关于使用Cocoa Pods导入Google Analytics iOS SDK时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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