Android的Studio无法解析符号Google分析V4 [英] Android Studio cannot resolve symbol GoogleAnalytics v4

查看:720
本文介绍了Android的Studio无法解析符号Google分析V4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想谷歌Analytics(分析)在我的Andr​​oid应用程序集成,但我有麻烦了。 (请参阅编辑)

I'm trying to integrate Google Analytics in my Android App, but I'm having trouble. (SEE EDIT)

https://developers.google.com/analytics/devguides/收集/ Android的,当我创建/ V4 /

HashMap<TrackerName, Tracker> mTrackers = new HashMap<TrackerName, Tracker>();

Android的工作室告诉我,不能解析符号跟踪

我已经使用谷歌播放服务在我的应用程序服务AdMob的,所以我不明白为什么我不能导入 com.google.android.gms.analytics.Tracker

I already use Google Play Services in my app to serve admob, so I don't understand why I cannot import com.google.android.gms.analytics.Tracker

在AndroidManifest.xml中,我有

In AndroidManifest.xml i have

<meta-data android:name="com.google.android.gms.version"
           android:value="@integer/google_play_services_version"/>

我是什么失踪?

修改结果
我也如下:<一href=\"http://stackoverflow.com/questions/24782901/how-to-integrate-google-analytics-in-android-app\">How谷歌分析整合Android应用
http://java.dzone.com/articles/working-google-analytics- API

但我却没有解决问题。

这是因为如果缺了点什么,谷歌播放服务,因为我使用它的应用程序内购买集成,但我不明白为什么Android的工作室并不想承认谷歌分析。

it is as if something was missing, google-play service is integrated because I'm using it for in-app purchase, but I do not understand why Android studio does not want to recognize google analytics.

增加对清晰度的照片:

add a photo for clarity:

项目结构:

编辑2

安卓值在这个的元数据

<meta-data android:name="com.google.android.gms.version"
           android:value="@integer/google_play_services_version"/>

其中, @整数/ GOOGLE_PLAY_SERVICES_VERSION 为4132500

我检查了SDK和我有额外做任何更新

I checked the sdk and I have no updates to be done in Extras

推荐答案

我猜你有一个的的谷歌Play版本服务在您的应用程序。

I would guess that you have an old version of Google Play Services in your app.

我的怀疑来自于一个事实,即类可以看到,如<​​code> GoogleApiClient , GoogleAuthUtil GooglePlayServicesNotAvailableException ,和C一直在播放业务present从最初的版本(我已经使用,至少),同时的 Google分析 加入的较晚,在版本4.3

My suspicion comes from the fact that the classes you can see, such as GoogleApiClient, GoogleAuthUtil, GooglePlayServicesNotAvailableException, &c have been present in Play Services from the very first versions (that I have used, at least) while GoogleAnalytics was added somewhat later, at version 4.3

谷歌播放服务的Froyo 的是停留在65年3月2日的版本,不包括它,例如

Google Play Services for Froyo is stuck at version 3.2.65 and doesn't include it, for example.

作为第一步,请构建应用程序,然后查看版本号<$c$c><project>\\<module>\\build\\intermediates\\exploded-aar\\com.google.android.gms\\play-services.当使用(电流)的最新版本,它应该是71年6月1日,或左右。

As the first step, please build your app and check the version number under <project>\<module>\build\intermediates\exploded-aar\com.google.android.gms\play-services. When using the (current) latest version, it should be 6.1.71, or thereabouts.

如果版本显示有低于4.3 ,然后它不会有谷歌Analytics(分析)包埋在里面,你应该检查/更新SDK(特别是谷歌库下额外)

If the version displayed there is lower than 4.3, then it won't have Google Analytics embeded inside, and you should check/update your SDK (particularly the Google Repository under extras)

在谷歌Play新增服务4.2 。所以,我有信心,你有这个赌。 :)

AdMob was added in Google Play Services 4.2. So I would bet with some confidence that you have this one. :)

这篇关于Android的Studio无法解析符号Google分析V4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆