Android应用示例中的Google Analytics错误

时间:2014-05-30 03:59:38

标签: android google-analytics

我是谷歌分析的新手。我尝试了这个链接https://developers.google.com/analytics/devguides/collection/android/v4/的教程。我已导入Mobile Playground项目并添加Google Analytics jar文件,但会出现许多错误。错误

error: Error: No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version').    AndroidManifest.xml /MobilePlayground   line 15 Android AAPT Problem
GoogleAnalytics cannot be resolved  AnalyticsSampleApp.java /MobilePlayground/src/com/google/android/gms/analytics/samples/mobileplayground line 48 Java Problem
HitBuilders cannot be resolved to a type    AppviewFragment.java    /MobilePlayground/src/com/google/android/gms/analytics/samples/mobileplayground line 71 Java Problem
GoogleAnalytics cannot be resolved to a type    AnalyticsSampleApp.java /MobilePlayground/src/com/google/android/gms/analytics/samples/mobileplayground line 48 Java Problem

我已经更改了一些导入,但仍然有错误。对于示例,我将import com.google.android.gms.analytics.GoogleAnalytics;更改为import com.google.analytics.tracking.android.GoogleAnalytics;

请告诉我如何修复此错误?

1 个答案:

答案 0 :(得分:0)

此错误 -

error: Error: No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version').

是因为您尚未将Google Play服务导入项目