- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我最近升级到了 iOS4 SDK,我的应用程序不再针对模拟器进行编译,但确实针对设备进行编译。
这是由第 3 方库 libGoogleAnalytics.a 造成的。解决方案似乎是谷歌发布一个符合新SDK的新静态库,不幸的是没有任何发布日期的消息,并且由于新SDK许可,他们可能永远不会发布新库。
http://www.google.com/support/forum/p/Google+Analytics/thread?tid=0e35876711dc99b1&hl=en
我收到以下编译错误:
Undefined symbols:
".objc_class_name_NSObject", referenced from:
.objc_class_name_GANTCPSocket in libGoogleAnalytics.a(GANTCPSocket.o)
.objc_class_name_GTMLogger in libGoogleAnalytics.a(GTMLogger.o)
.objc_class_name_GTMLogBasicFormatter in libGoogleAnalytics.a(GTMLogger.o)
.objc_class_name_GTMLogLevelFilter in libGoogleAnalytics.a(GTMLogger.o)
.objc_class_name_GTMLogNoFilter in libGoogleAnalytics.a(GTMLogger.o)
.objc_class_name_GTMLogASLWriter in libGoogleAnalytics.a(GTMLogger+ASL.o)
.objc_class_name_GTMLoggerASLClient in libGoogleAnalytics.a(GTMLogger+ASL.o)
.objc_class_name_GANDataDispatcher in libGoogleAnalytics.a(GANDataDispatcher.o)
.objc_class_name_GANHTTPResponseParser in libGoogleAnalytics.a(GANHTTPResponseParser.o)
.objc_class_name_GANEvent in libGoogleAnalytics.a(GANEvent.o)
.objc_class_name_GTMLoggerRingBufferWriter in libGoogleAnalytics.a(GTMLoggerRingBufferWriter.o)
.objc_class_name_GANTracker in libGoogleAnalytics.a(GANTracker.o)
.objc_class_name_GANPersistentEventStore in libGoogleAnalytics.a(GANPersistentEventStore.o)
".objc_class_name_NSFileManager", referenced from:
literal-pointer@__OBJC@__cls_refs@NSFileManager in libGoogleAnalytics.a(GANPersistentEventStore.o)
".objc_class_name_NSString", referenced from:
literal-pointer@__OBJC@__cls_refs@NSString in libGoogleAnalytics.a(GTMLogger.o)
literal-pointer@__OBJC@__cls_refs@NSString in libGoogleAnalytics.a(GANTracker.o)
literal-pointer@__OBJC@__cls_refs@NSString in libGoogleAnalytics.a(GANPersistentEventStore.o)
".objc_class_name_NSError", referenced from:
literal-pointer@__OBJC@__cls_refs@NSError in libGoogleAnalytics.a(GANTracker.o)
literal-pointer@__OBJC@__cls_refs@NSError in libGoogleAnalytics.a(GANPersistentEventStore.o)
".objc_class_name_NSFileHandle", referenced from:
literal-pointer@__OBJC@__cls_refs@NSFileHandle in libGoogleAnalytics.a(GTMLogger.o)
".objc_class_name_NSMutableString", referenced from:
literal-pointer@__OBJC@__cls_refs@NSMutableString in libGoogleAnalytics.a(GANDataDispatcher.o)
".objc_class_name_NSTimer", referenced from:
literal-pointer@__OBJC@__cls_refs@NSTimer in libGoogleAnalytics.a(GANTracker.o)
".objc_class_name_NSMutableArray", referenced from:
literal-pointer@__OBJC@__cls_refs@NSMutableArray in libGoogleAnalytics.a(GANDataDispatcher.o)
literal-pointer@__OBJC@__cls_refs@NSMutableArray in libGoogleAnalytics.a(GANPersistentEventStore.o)
".objc_class_name_UIScreen", referenced from:
literal-pointer@__OBJC@__cls_refs@UIScreen in libGoogleAnalytics.a(GANDataDispatcher.o)
".objc_class_name_NSProcessInfo", referenced from:
literal-pointer@__OBJC@__cls_refs@NSProcessInfo in libGoogleAnalytics.a(GTMLogger.o)
"_objc_exception_extract", referenced from:
+[GTMLogger sharedLogger] in libGoogleAnalytics.a(GTMLogger.o)
+[GTMLogger setSharedLogger:] in libGoogleAnalytics.a(GTMLogger.o)
-[GTMLogger setWriter:] in libGoogleAnalytics.a(GTMLogger.o)
-[GTMLogger setFormatter:] in libGoogleAnalytics.a(GTMLogger.o)
-[GTMLogger setFilter:] in libGoogleAnalytics.a(GTMLogger.o)
-[NSFileHandle(GTMFileHandleLogWriter) logMessage:level:] in libGoogleAnalytics.a(GTMLogger.o)
-[NSArray(GTMArrayCompositeLogWriter) logMessage:level:] in libGoogleAnalytics.a(GTMLogger.o)
-[GTMLogStandardFormatter stringForFunc:withFormat:valist:level:] in libGoogleAnalytics.a(GTMLogger.o)
-[GTMLoggerRingBufferWriter count] in libGoogleAnalytics.a(GTMLoggerRingBufferWriter.o)
-[GTMLoggerRingBufferWriter droppedLogCount] in libGoogleAnalytics.a(GTMLoggerRingBufferWriter.o)
-[GTMLoggerRingBufferWriter reset] in libGoogleAnalytics.a(GTMLoggerRingBufferWriter.o)
-[GTMLoggerRingBufferWriter dumpContents] in libGoogleAnalytics.a(GTMLoggerRingBufferWriter.o)
-[GTMLoggerRingBufferWriter logMessage:level:] in libGoogleAnalytics.a(GTMLoggerRingBufferWriter.o)
+[GANTracker sharedTracker] in libGoogleAnalytics.a(GANTracker.o)
+[GANTracker allocWithZone:] in libGoogleAnalytics.a(GANTracker.o)
-[GANTracker startTrackerWithAccountID:dispatchPeriod:delegate:] in libGoogleAnalytics.a(GANTracker.o)
-[GANTracker trackPageview:withError:] in libGoogleAnalytics.a(GANTracker.o)
-[GANTracker trackEvent:action:label:value:withError:] in libGoogleAnalytics.a(GANTracker.o)
-[GANTracker stopTracker] in libGoogleAnalytics.a(GANTracker.o)
-[GANTracker dispatch] in libGoogleAnalytics.a(GANTracker.o)
".objc_class_name_NSDate", referenced from:
literal-pointer@__OBJC@__cls_refs@NSDate in libGoogleAnalytics.a(GTMLogger.o)
literal-pointer@__OBJC@__cls_refs@NSDate in libGoogleAnalytics.a(GANPersistentEventStore.o)
".objc_class_name_UIDevice", referenced from:
literal-pointer@__OBJC@__cls_refs@UIDevice in libGoogleAnalytics.a(GANDataDispatcher.o)
"_objc_exception_try_exit", referenced from:
+[GTMLogger sharedLogger] in libGoogleAnalytics.a(GTMLogger.o)
+[GTMLogger setSharedLogger:] in libGoogleAnalytics.a(GTMLogger.o)
-[GTMLogger setWriter:] in libGoogleAnalytics.a(GTMLogger.o)
-[GTMLogger setFormatter:] in libGoogleAnalytics.a(GTMLogger.o)
-[GTMLogger setFilter:] in libGoogleAnalytics.a(GTMLogger.o)
-[NSFileHandle(GTMFileHandleLogWriter) logMessage:level:] in libGoogleAnalytics.a(GTMLogger.o)
-[NSArray(GTMArrayCompositeLogWriter) logMessage:level:] in libGoogleAnalytics.a(GTMLogger.o)
-[GTMLogStandardFormatter stringForFunc:withFormat:valist:level:] in libGoogleAnalytics.a(GTMLogger.o)
-[GTMLoggerRingBufferWriter count] in libGoogleAnalytics.a(GTMLoggerRingBufferWriter.o)
-[GTMLoggerRingBufferWriter droppedLogCount] in libGoogleAnalytics.a(GTMLoggerRingBufferWriter.o)
-[GTMLoggerRingBufferWriter reset] in libGoogleAnalytics.a(GTMLoggerRingBufferWriter.o)
-[GTMLoggerRingBufferWriter dumpContents] in libGoogleAnalytics.a(GTMLoggerRingBufferWriter.o)
-[GTMLoggerRingBufferWriter logMessage:level:] in libGoogleAnalytics.a(GTMLoggerRingBufferWriter.o)
+[GANTracker sharedTracker] in libGoogleAnalytics.a(GANTracker.o)
+[GANTracker allocWithZone:] in libGoogleAnalytics.a(GANTracker.o)
-[GANTracker startTrackerWithAccountID:dispatchPeriod:delegate:] in libGoogleAnalytics.a(GANTracker.o)
-[GANTracker trackPageview:withError:] in libGoogleAnalytics.a(GANTracker.o)
-[GANTracker trackEvent:action:label:value:withError:] in libGoogleAnalytics.a(GANTracker.o)
-[GANTracker stopTracker] in libGoogleAnalytics.a(GANTracker.o)
-[GANTracker dispatch] in libGoogleAnalytics.a(GANTracker.o)
".objc_class_name_NSDateFormatter", referenced from:
literal-pointer@__OBJC@__cls_refs@NSDateFormatter in libGoogleAnalytics.a(GTMLogger.o)
"_objc_exception_try_enter", referenced from:
+[GTMLogger sharedLogger] in libGoogleAnalytics.a(GTMLogger.o)
+[GTMLogger setSharedLogger:] in libGoogleAnalytics.a(GTMLogger.o)
-[GTMLogger setWriter:] in libGoogleAnalytics.a(GTMLogger.o)
-[GTMLogger setFormatter:] in libGoogleAnalytics.a(GTMLogger.o)
-[GTMLogger setFilter:] in libGoogleAnalytics.a(GTMLogger.o)
-[NSFileHandle(GTMFileHandleLogWriter) logMessage:level:] in libGoogleAnalytics.a(GTMLogger.o)
-[NSArray(GTMArrayCompositeLogWriter) logMessage:level:] in libGoogleAnalytics.a(GTMLogger.o)
-[GTMLogStandardFormatter stringForFunc:withFormat:valist:level:] in libGoogleAnalytics.a(GTMLogger.o)
-[GTMLoggerRingBufferWriter count] in libGoogleAnalytics.a(GTMLoggerRingBufferWriter.o)
-[GTMLoggerRingBufferWriter droppedLogCount] in libGoogleAnalytics.a(GTMLoggerRingBufferWriter.o)
-[GTMLoggerRingBufferWriter reset] in libGoogleAnalytics.a(GTMLoggerRingBufferWriter.o)
-[GTMLoggerRingBufferWriter dumpContents] in libGoogleAnalytics.a(GTMLoggerRingBufferWriter.o)
-[GTMLoggerRingBufferWriter logMessage:level:] in libGoogleAnalytics.a(GTMLoggerRingBufferWriter.o)
+[GANTracker sharedTracker] in libGoogleAnalytics.a(GANTracker.o)
+[GANTracker allocWithZone:] in libGoogleAnalytics.a(GANTracker.o)
-[GANTracker startTrackerWithAccountID:dispatchPeriod:delegate:] in libGoogleAnalytics.a(GANTracker.o)
-[GANTracker trackPageview:withError:] in libGoogleAnalytics.a(GANTracker.o)
-[GANTracker trackEvent:action:label:value:withError:] in libGoogleAnalytics.a(GANTracker.o)
-[GANTracker stopTracker] in libGoogleAnalytics.a(GANTracker.o)
-[GANTracker dispatch] in libGoogleAnalytics.a(GANTracker.o)
".objc_class_name_NSUserDefaults", referenced from:
literal-pointer@__OBJC@__cls_refs@NSUserDefaults in libGoogleAnalytics.a(GTMLogger.o)
".objc_class_name_NSThread", referenced from:
literal-pointer@__OBJC@__cls_refs@NSThread in libGoogleAnalytics.a(GTMLogger+ASL.o)
".objc_class_name_NSBundle", referenced from:
literal-pointer@__OBJC@__cls_refs@NSBundle in libGoogleAnalytics.a(GANDataDispatcher.o)
".objc_class_name_NSAssertionHandler", referenced from:
literal-pointer@__OBJC@__cls_refs@NSAssertionHandler in libGoogleAnalytics.a(GANTracker.o)
literal-pointer@__OBJC@__cls_refs@NSAssertionHandler in libGoogleAnalytics.a(GANPersistentEventStore.o)
".objc_class_name_NSLocale", referenced from:
literal-pointer@__OBJC@__cls_refs@NSLocale in libGoogleAnalytics.a(GANDataDispatcher.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
Google 论坛上的一个建议是创建 GANTracker 类的虚拟实现以在模拟器中使用。即创建一个文件GANTracker_stub.m:
#import "GANTracker.h"
#if TARGET_IPHONE_SIMULATOR
@implementation GANTracker
+ (GANTracker *)sharedTracker
{
return [[[GANTracker alloc] init] autorelease];
}
- (void)startTrackerWithAccountID:(NSString *)accountID
dispatchPeriod:(NSInteger)dispatchPeriod
delegate:(id<GANTrackerDelegate>)delegate
{
}
- (void)stopTracker
{
}
- (BOOL)trackPageview:(NSString *)pageURL
withError:(NSError **)error
{
return YES;
}
- (BOOL)trackEvent:(NSString *)category
action:(NSString *)action
label:(NSString *)label
value:(NSInteger)value
withError:(NSError **)error
{
return YES;
}
- (BOOL)dispatch
{
return YES;
}
@end
#endif
但这对我不起作用,我缺少什么吗?
最佳答案
通过 Google Analytics 论坛找到的解决方案:
用途:
lipo libGoogleAnalytics.a -删除 i386 -输出 libGoogleAnalytics2.a
然后从您的项目中删除 libGoogleAnalytics.a 并添加 libGoogleAnalytics2.a
这只能与 GANTracker 的虚拟实现结合使用,如上所示。
关于iphone - libGoogleAnalytics.a 与 iPhone iOS4 模拟器的链接问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3128788/
我最近升级到了 iOS4 SDK,我的应用程序不再针对模拟器进行编译,但确实针对设备进行编译。 这是由第 3 方库 libGoogleAnalytics.a 造成的。解决方案似乎是谷歌发布一个符合新S
我正在尝试通过我的 Android 应用程序上的谷歌分析扩展跟踪。目前我正在尝试发送自定义变量。但似乎我缺少该库的 java 文档,有人可以将 javadoc.zip 发送给我吗?另外,如何使用 tr
我是一名优秀的程序员,十分优秀!