尝试安装新的 Google Analytics 3.0 Beta 时出现链接器错误 [英] Linker errors when trying to install new Google Analytics 3.0 Beta

查看:26
本文介绍了尝试安装新的 Google Analytics 3.0 Beta 时出现链接器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我相信就在今天,Google 发布了他们的 iOS 分析框架(3.0 版)的新更新.当我按照说明尝试运行代码时,我得到:

I believe just today Google released a new update to their iOS Analytics frame work (version 3.0). When I follow the instructions and try to run the code, I get:

架构 armv7 的未定义符号:_inflate",引用从:libGoogleAnalyticsServices.a(NSData+zlib.o)_deflate"中的l002,引用自:libGoogleAnalyticsServices.a(NSData+zlib.o) "inflateInit2" 中的 l001,引用自:libGoogleAnalyticsServices.a(NSData+zlib.o)_deflateEnd"中的l002,引用自:libGoogleAnalyticsServices.a(NSData+zlib.o)_OBJC_CLASS_$_ASIdentifierManager"中的l001,引用自:libGoogleAnalyticsServices.a(TAGAdvertiserId.o) 中的 objc-class-reflibGoogleAnalyticsServices.a(TAGAdvertisingTrackingEnabledMacro.o) 中的 objc-class-reflibGoogleAnalyticsServices.a(TAGMobileAdwordsUniqueIdMacro.o)
中的objc-class-ref_inflateEnd",引用自:libGoogleAnalyticsServices.a(NSData+zlib.o)_SCNetworkReachabilityCreateWithName"中的l002,引用自:libGoogleAnalyticsServices.a(GAIReachabilityChecker.o) 中的 l027libGoogleAnalyticsServices.a(TAGNetReachability.o)_SCNetworkReachabilitySetCallback"中的l002,引用自:libGoogleAnalyticsServices.a(GAIReachabilityChecker.o) 中的 l027libGoogleAnalyticsServices.a(TAGNetReachability.o) 中的 l002libGoogleAnalyticsServices.a(TAGNetReachability.o) "deflateInit2" 中的 l003,引用自:libGoogleAnalyticsServices.a(NSData+zlib.o)_SCNetworkReachabilityScheduleWithRunLoop"中的l001,引用自:libGoogleAnalyticsServices.a(GAIReachabilityChecker.o) 中的 l027libGoogleAnalyticsServices.a(TAGNetReachability.o)中的l002_SCNetworkReachabilityUnscheduleFromRunLoop",引用自:libGoogleAnalyticsServices.a(GAIReachabilityChecker.o) 中的 l027l003 在 libGoogleAnalyticsServices.a(TAGNetReachability.o) ld:找不到架构 armv7 clang 的符号:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)

Undefined symbols for architecture armv7: "_inflate", referenced from: l002 in libGoogleAnalyticsServices.a(NSData+zlib.o) "_deflate", referenced from: l001 in libGoogleAnalyticsServices.a(NSData+zlib.o) "inflateInit2", referenced from: l002 in libGoogleAnalyticsServices.a(NSData+zlib.o) "_deflateEnd", referenced from: l001 in libGoogleAnalyticsServices.a(NSData+zlib.o) "_OBJC_CLASS_$_ASIdentifierManager", referenced from: objc-class-ref in libGoogleAnalyticsServices.a(TAGAdvertiserId.o) objc-class-ref in libGoogleAnalyticsServices.a(TAGAdvertisingTrackingEnabledMacro.o) objc-class-ref in libGoogleAnalyticsServices.a(TAGMobileAdwordsUniqueIdMacro.o)
"_inflateEnd", referenced from: l002 in libGoogleAnalyticsServices.a(NSData+zlib.o) "_SCNetworkReachabilityCreateWithName", referenced from: l027 in libGoogleAnalyticsServices.a(GAIReachabilityChecker.o) l002 in libGoogleAnalyticsServices.a(TAGNetReachability.o) "_SCNetworkReachabilitySetCallback", referenced from: l027 in libGoogleAnalyticsServices.a(GAIReachabilityChecker.o) l002 in libGoogleAnalyticsServices.a(TAGNetReachability.o) l003 in libGoogleAnalyticsServices.a(TAGNetReachability.o) "deflateInit2", referenced from: l001 in libGoogleAnalyticsServices.a(NSData+zlib.o) "_SCNetworkReachabilityScheduleWithRunLoop", referenced from: l027 in libGoogleAnalyticsServices.a(GAIReachabilityChecker.o) l002 in libGoogleAnalyticsServices.a(TAGNetReachability.o) "_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from: l027 in libGoogleAnalyticsServices.a(GAIReachabilityChecker.o) l003 in libGoogleAnalyticsServices.a(TAGNetReachability.o) ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

可能他们忘记包含我需要添加的库?(他们也忘记更改说明的其他一些方面).否则已经按照他们的指示去开球,但仍然没有得到所需的结果.

Possible they forgot to include a lib I need to add? (some other aspects of the instructions they forgot to change as well). Otherwise have followed their instructions to a tee and still not getting the needed results.

推荐答案

我必须将 libz.dylibAdSupport.framework 添加到构建阶段才能实现离开.Google 没有在他们的说明中包含这些内容,因此请与他们核对以确保没有问题,然后会更新此帖子.

I had to add both libz.dylib and AdSupport.framework to the build phases to make this go away. Google doesn't include these in their instructions so going to check with them to make sure this is OK then will update this post.

更新:现在您还需要添加 libsqlite3.0.dylib 以使其工作.

UPDATE: Now you also need to add libsqlite3.0.dylib to get it to work.

这篇关于尝试安装新的 Google Analytics 3.0 Beta 时出现链接器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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