Android GoogleAnalytics getInstance [英] Android GoogleAnalytics getInstance

查看:11
本文介绍了Android GoogleAnalytics getInstance的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Application 类中,在 create 方法中我调用 GoogleAnalytics.getInstance(this) 并且应用程序只是冻结...在任何设备上与 google play services 6.1 一起工作正常,现在是 6.5,我不知道是什么导致了这个......有什么想法吗?

in Application class, in create method I call GoogleAnalytics.getInstance(this) and application just freezes...on any device Worked fine with google play services 6.1, now it's 6.5 and I have no idea what could cause this.... Any ideas?

public class BaseApplication extends Application {

    private static Tracker mTracker;
    private MyProfile mMyProfile;

    public BaseApplication() {
        super();
    }

    private void initTracker() {
        if (mTracker == null) {
            GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
            mTracker = analytics.newTracker(R.xml.global_tracker);
            mTracker.enableAdvertisingIdCollection(true);
        }
    }

`...

Gradle 
dependencies {
    compile project(':IMFramework')
    compile 'com.android.support:appcompat-v7:21.0.3'
    compile 'com.google.android.gms:play-services-base:6.5.87'
    compile 'com.google.android.gms:play-services-maps:6.5.87'
}

推荐答案

与 google play services 6.1 配合良好

Worked fine with google play services 6.1

好的,我确实回滚到 6.1.+我认为这是一些内部错误,将在下次更新中修复.

Good, I did rollback to 6.1.+ I think it some internal error that will be fixed in an next update.

更新

它在 7.0 中修复

这篇关于Android GoogleAnalytics getInstance的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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