我正在将Google Analytics SDK 3.0集成到我的项目中,但是在构建项目时遇到了链接错误(linker errors)。
如文档所述,我已经将以下库链接到我的项目中:
- libGoogleAnalyticsServices.a
- AdSupport.framework
- CoreData.framework
- SystemConfiguration.framework
- libz.dylib
即使如此,在构建项目时仍然会出现以下错误:
d: warning: directory not found for option '-L"/Users/....NameProject/Libraries/Google Analytics"'
"_sqlite3_bind_blob", referenced from:
-[TAGDataLayerPersistentStoreImpl writeEntriesToDatabase:expireTime:] in libGoogleAnalyticsServices.a(TAGDataLayerPersistentStoreImpl.o)
"_sqlite3_bind_int", referenced from:
-[TAGDataLayerPersistentStoreImpl deleteEntries:] in libGoogleAnalyticsServices.a(TAGDataLayerPersistentStoreImpl.o)
"_sqlite3_bind_int64", referenced from:
-[TAGDataLayerPersistentStoreImpl writeEntriesToDatabase:expireTime:] in libGoogleAnalyticsServices.a(TAGDataLayerPersistentStoreImpl.o)
-[TAGDataLayerPersistentStoreImpl peekEntryIds:] in libGoogleAnalyticsServices.a(TAGDataLayerPersistentStoreImpl.o)
....
这些错误是由什么引起的?我有遗漏什么吗?
感谢您的帮助。
解决方案:
我通过将我的项目与libsqlite3.0
库链接来解决它。Google Analytics文档没有提到链接这个库。希望这可以帮到您。