我还是 iOS 开发的新手,我需要将谷歌分析添加到我的 phonegap 项目中,但我不想使用 javascript 方式并将其视为网站,我想使用 Objective-C 以适当的方式添加它. 问题是每当我尝试添加谷歌分析文件和框架时,我都会收到以下错误:
Undefined symbols for architecture i386:
"_deflate", referenced from:
anon in libGoogleAnalyticsServices.a(NSData+zlib.o)
"_deflateEnd", referenced from:
anon in libGoogleAnalyticsServices.a(NSData+zlib.o)
"_deflateInit2_", referenced from:
anon in libGoogleAnalyticsServices.a(NSData+zlib.o)
"_inflate", referenced from:
anon in libGoogleAnalyticsServices.a(NSData+zlib.o)
"_inflateEnd", referenced from:
anon in libGoogleAnalyticsServices.a(NSData+zlib.o)
"_inflateInit2_", referenced from:
anon in libGoogleAnalyticsServices.a(NSData+zlib.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我也在应用程序中使用 admob,但 admob 工作正常,我还尝试搜索重复文件以进行谷歌分析,但找不到任何文件,当我尝试将谷歌分析添加到任何其他不包括 phonegap 的项目时,它工作正常。请帮助我,我已经尝试完成这项工作 2 周了。