[英]Google Analytics V3
I have some trouble wuth using Google Analytics in my project. 我在项目中使用Google Analytics(分析)时遇到了一些麻烦。
I added libraries described in Google Analytics SDK documentation, but still have seven troubles. 我添加了Google Analytics(分析)SDK文档中描述的库,但是仍然有七个麻烦。 Here it is
这里是
Undefined symbols for architecture i386:
"_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)
"_llvm_gcda_emit_arcs", referenced from:
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIUtil.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIDefaultLogger.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAI.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAITrackerImpl.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIDataStore.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIError.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAICoreDataUtil.o)
...
"_llvm_gcda_emit_function", referenced from:
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIUtil.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIDefaultLogger.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAI.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAITrackerImpl.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIDataStore.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIError.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAICoreDataUtil.o)
...
"_llvm_gcda_end_file", referenced from:
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIUtil.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIDefaultLogger.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAI.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAITrackerImpl.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIDataStore.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIHit.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIError.o)
...
"_llvm_gcda_increment_indirect_counter", referenced from:
-[GAI defaultTracker] in libGoogleAnalytics_debug.a(GAI.o)
-[GAI setDefaultTracker:] in libGoogleAnalytics_debug.a(GAI.o)
-[GAI clientId] in libGoogleAnalytics_debug.a(GAI.o)
-[GAI dispatchInterval] in libGoogleAnalytics_debug.a(GAI.o)
-[GAI setDispatchInterval:] in libGoogleAnalytics_debug.a(GAI.o)
-[GAI trackUncaughtExceptions] in libGoogleAnalytics_debug.a(GAI.o)
-[GAI setTrackUncaughtExceptions:] in libGoogleAnalytics_debug.a(GAI.o)
...
"_llvm_gcda_start_file", referenced from:
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIUtil.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIDefaultLogger.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAI.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAITrackerImpl.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIDataStore.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIHit.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIError.o)
...
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I don't understand what I have to do. 我不知道该怎么办。 Can you help me?
你能帮助我吗? Thanks.
谢谢。 Sorry for my English :)
对不起我的英语不好 :)
Remove libGoogleAnalytics_debug.a from the project. 从项目中删除libGoogleAnalytics_debug.a。
I got the same error and realized the error was on libGoogleAnalytics_debug.a. 我遇到了同样的错误,并意识到该错误在libGoogleAnalytics_debug.a上。 Google's documentation doesn't say anything about adding libGoogleAnalytics_debug.a so I removed it from the project and the errors went away.
Google的文档没有提及添加libGoogleAnalytics_debug.a的任何内容,因此我将其从项目中删除,错误消失了。
You need to add the AdSupport.framework to your project. 您需要将AdSupport.framework添加到您的项目中。 This is missing from Google's instructions.
Google的说明中缺少此内容。
I've got two main issues adding GAM 3: 添加GAM时,我遇到了两个主要问题:
Here I answered a question about GA : link There, I added a lot of information about GA. 在这里,我回答了有关GA的问题: link在这里,我添加了许多有关GA的信息。 There are information for 2.0beta, and for 3.0 too (after "EDIT for 3.0:").
有关于2.0beta和3.0的信息(在“ EDIT for 3.0:”之后)。 I'm using 2.0beta and it works okey.
我正在使用2.0beta,它可以正常工作。
Just Use Following files: 只需使用以下文件:
GAI.h
GAIDictionaryBuilder.h
GAIFields.h
GAILogger.h
GAITrackedViewController.h
GAITracker.h
libGoogleAnalyticsServices.a
as you can see on CuteAnimal
of GA example 正如您在GA的
CuteAnimal
示例中看到的
Adding AdSupport.framework cleared the linker errors. 添加AdSupport.framework可清除链接器错误。 worked for me.
为我工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.