0

我正在尝试将 Google Analitics 集成到 android 中,但我有一些疑问和问题。

1.- 是否需要使用 EasyTracker Jar libGoogleAnalyticsServices.jar?

2.- 我遵循了本指南

https://developers.google.com/analytics/devguides/collection/android/v3/?hl=es#analytics-xml

我的构建中有 Easytracker.jar,但它会引发此错误。

这是我下载的easytracker ->

http://code.google.com/p/analytics-api-samples/downloads/detail?name=EasyTrackerAndroid_1.0.zip&can=2&q=

10-26 17:44:45.411: I/dalvikvm(2972): Could not find method com.google.analytics.tracking.android.EasyTracker.getInstance, referenced from method com.androidexample.uploadtoserver.Splash.onStart
10-26 17:44:45.411: W/dalvikvm(2972): VFY: unable to resolve static method 3570: Lcom/google/analytics/tracking/android/EasyTracker;.getInstance (Landroid/content/Context;)Lcom/google/analytics/tracking/android/EasyTracker;
10-26 17:44:45.421: D/dalvikvm(2972): VFY: replacing opcode 0x71 at 0x0003
10-26 17:44:45.421: I/dalvikvm(2972): Could not find method com.google.analytics.tracking.android.EasyTracker.getInstance, referenced from method com.androidexample.uploadtoserver.Splash.onStop
10-26 17:44:45.421: W/dalvikvm(2972): VFY: unable to resolve static method 3570: Lcom/google/analytics/tracking/android/EasyTracker;.getInstance (Landroid/content/Context;)Lcom/google/analytics/tracking/android/EasyTracker;
10-26 17:44:45.421: D/dalvikvm(2972): VFY: replacing opcode 0x71 at 0x0003
10-26 17:44:45.431: I/BugSenseHandler(2972): Registering default exceptions handler
10-26 17:44:45.526: D/dalvikvm(2972): GC_FOR_ALLOC freed 132K, 4% free 13772K/14211K, paused 29ms
10-26 17:44:45.531: I/dalvikvm-heap(2972): Grow heap (frag case) to 15.155MB for 1536016-byte allocation
10-26 17:44:45.566: D/dalvikvm(2972): GC_FOR_ALLOC freed <1K, 4% free 15271K/15751K, paused 14ms
4

1 回答 1

0
  1. 在 Eclipse 中,右键单击您的项目,选择 Properties。
  2. 在 Java Build Path 下,单击 Order & Export 选项卡。检查 Android 私有库,然后单击确定。
  3. 清理项目并重建它。它现在应该可以工作了。
于 2015-01-29T11:11:17.890 回答