我在我的项目中使用 Google Analytics 时遇到了一些麻烦。
我添加了 Google Analytics SDK 文档中描述的库,但仍然有七个问题。这里是
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)
我不明白我必须做什么。你能帮助我吗?谢谢。对不起我的英语不好 :)