Android - AnalyticsReceiver未注册或被禁用? [英] Android - AnalyticsReceiver is not registered or is disabled?

本文介绍了Android - AnalyticsReceiver未注册或被禁用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  05-11 14:57:我在使用谷歌分析,但是当我使用adb进行调试时, 48.911 1681-1912 /? W / GAv4-SVC:网络压缩的POST连接错误:java.net.ConnectException:60000ms后无法连接到ssl.google-analytics.com/127.0.0.1(端口443):isConnected失败:ECONNREFUSED(连接被拒绝)
05-11 14:58:43.591 7281-7281 /? I / GAv4:Google Analytics(分析)8.2.98正在启动。要在设备上运行调试日志记录:
adb shell setprop log.tag.GAv4 DEBUG
adb logcat -s GAv4
05-11 14:58:43.631 7281-7281 /? W / GAv4:AnalyticsReceiver未注册或已禁用。注册接收器,以便在非Google Play设备上进行可靠的调度。请参阅一些网址获取说明。
05-11 14:58:43.681 7281-7281 /? D / GAv4:setLocalDispatchPeriod(秒):60
05-11 14:58:43.681 7281-7330 /? W / GAv4:AnalyticsService未在应用清单中注册。命中可能无法可靠传送。请参阅一些网址获取说明。
05-11 14:58:48.131 7237-7268 /? I / GAV3:线程[GAThread,5,main]:未找到任何活动数据。
05-11 14:59:23.171 7761-7785 /? I / GAv4:Google Analytics 8.1.15正在启动。要在设备上运行调试日志记录:
adb shell setprop log.tag.GAv4 DEBUG
adb logcat -s GAv4
05-11 14:59:23.181 7761-7785 /? W / GAv4:AnalyticsReceiver未注册或被禁用。注册接收器,以便在非Google Play设备上进行可靠的调度。请参阅一些网址获取说明。
05-11 14:59:23.191 7761-7785 /? W / GAv4:CampaignTrackingReceiver未注册,未导出或已禁用。安装活动跟踪是不可能的。请参阅一些网址获取说明。
05-11 14:59:23.191 7761-7791 /? W / GAv4:AnalyticsService未在应用清单中注册。命中可能无法可靠传送。请参阅一些网址获取说明。
05-11 14:59:23.591 7817-7817 / com.example.admin.helloanalytics I / GAv4:Google Analytics 8.4.87正在启动。要在设备上运行调试日志记录:
adb shell setprop log.tag.GAv4 DEBUG
adb logcat -s GAv4
05-11 14:59:23.591 7817-7817 / com.example .admin.helloanalytics D / GAv4:XML配置 - 应用程序名称:XXXXX
05-11 14:59:23.591 7817-7817 / com.example.admin.helloanalytics D / GAv4:XML配置 - 应用程序版本:1.0
05-11 14:59:23.591 7817-7817 / com.example.admin.helloanalytics D / GAv4:XML配置 - 发送周期(秒):1800
05-11 14:59:23.591 7817- 7817 / com.example.admin.helloanalytics D / GAv4:XML配置 - 空运行:false
05-11 14:59:23.601 7817-7817 / com.example.admin.helloanalytics D / GAv4:setLocalDispatchPeriod(sec ):1800
05-11 14:59:23.881 7817-7872 / com.example.admin.helloanalytics D / GAv4:命中交付请求:ht = 1462962563740,_s = 50,_v = ma8.4.87,a = 2122668187,adid = 7d85460d-4d41-4d41-8225-b1499b154b44,aid = com.example.a dmin.helloanalytics,an = XXXXX,ate = 1,av = 1.0,cd = com.example.admin.helloanalytics.MainActivity,cid = 577d2178-6c7e-431d-a258-cea382dd9263,sr = 540x960,t = screenview,tid = UA-77544180-1,ul = en-us,v = 1
05-11 14:59:23.921 7817-7872 / com.example.admin.helloanalytics D / GAv4:命中交付请求:ht = 1462962563740, _s = 51,_v = ma8.4.87,a = 2122668188,adid = 7d85460d-4d41-4d41-8225-b1499b154b44,aid = com.example.admin.helloanalytics,an = XXXXX,ate = 1,av = 1.0,cd = com.example.admin.helloanalytics.MainActivity,cid = 577d2178-6c7e-431d-a258-cea382dd9263,sc = start,sr = 540x960,t = screenview,tid = UA-77544180-1,ul = en-us,v = 1
05-11 14:59:23.991 7817-7872 / com.example.admin.helloanalytics D / GAv4:点击发送到设备AnalyticsService进行交付
05-11 14:59:24.531 7817- 7872 / com.example.admin.helloanalytics D / GAv4:点击发送到设备AnalyticsService进行交付
05-11 14:59:24.801 7915-7915 /? W / GAV2:线程[main,5,main]:需要调用initialize()并处于备用模式才能开始调度。
05-11 14:59:25.151 7964-7964 /? I / GAv4:Google Analytics(分析)8.2.98正在启动。要在设备上运行调试日志记录:
adb shell setprop log.tag.GAv4 DEBUG
adb logcat -s GAv4
05-11 14:59:25.161 7964-7964 /? W / GAv4:AnalyticsReceiver未注册或被禁用。注册接收器,以便在非Google Play设备上进行可靠的调度。请参阅一些网址获取说明。
05-11 14:59:25.191 7964-7964 /? D / GAv4:setLocalDispatchPeriod(sec):60
05-11 14:59:25.191 7964-8007 /? W / GAv4:AnalyticsService未在应用清单中注册。命中可能无法可靠传送。请参阅一些网址获取说明。
05-11 14:59:29.771 7915-7955 /? I / GAV2:线程[GAThread,5,main]:未找到任何活动数据。
05-11 14:59:49.111 1681-1912 /? W / GAv4-SVC:网络压缩的POST连接错误:java.net.ConnectException:60000ms后无法连接到ssl.google-analytics.com/127.0.0.1(端口443):isConnected失败:ECONNREFUSED(连接被拒绝)
05-11 15:00:12.531 7817-7872 / com.example.admin.helloanalytics D / GAv4:命中交付请求:ht = 1462962612433,_s = 52,_v = ma8.4.87,a = 2122668189,adid = 7d85460d -4d41-4d41-8225-b1499b154b44,aid = com.example.admin.helloanalytics,an = XXXXX,ate = 1,av = 1.0,cd = com.example.admin.helloanalytics.MainActivity,cid = 577d2178-6c7e-431d -a258-cea382dd9263,ea = Share,ec = Action,sr = 540x960,t =事件,tid = UA-77544180-1,ul = en-us,v = 1
05-11 15:00:12.621 7817-7872 / com.example.admin.helloanalytics D / GAv4:点击发送到设备AnalyticsService进行交付
05-11 15:00:12.671 7817-7872 / com.example.admin.helloanalytics D / GAv4:命中交付请求:ht = 1462962612569,_s = 53,_v = ma8.4.87,a = 2122668189,adid = 7d85460d-4d41-4d41-8225-b1499b154b44,aid = com.example.admin.helloanalytics, an = XXXXX,ate = 1,av = 1.0,cd = com.example.admin.helloanalytics.Second,cid = 577d2178-6c7e-431d-a258-cea382dd9263,sr = 540x960,t = screenview,tid = UA-77544180- 1,ul = en-us,v = 1
05-11 15:00:00 12.691 7817-7872 / com.example.admin.helloanalytics D / GAv4:命中交付请求:ht = 1462962612569,_s = 54, _v = ma8.4.87,a = 2122668190,adid = 7d85460d-4d41-4d41-8225-b1499b154b44,aid = com.example.admin.helloanalytics,an = XXXXX,ate = 1,av = 1.0,cd = com.example。 admin.helloanalytics.Second,cid = 577d2178-6c7e-431d-a258-cea382dd9263,sr = 540x960,t = screenview,tid = UA-77544180-1,ul = zh-cn,v = 1
05-11 15:00:12.751 7817-7872 / com.example.admin.helloanalytics D / GAv4:点击发送到设备AnalyticsService进行交付
05-11 15:00:12.791 7817-7872 / com.example.admin。 helloanalytics D / GAv4:点击发送到设备AnalyticsService进行交付

我的谷歌分析是连接还是连接

这是我的MainActivity:

  import android.cont ent.Intent; 
导入android.support.v7.app.AppCompatActivity;
导入android.os.Bundle;
导入android.view.View;
导入android.widget.Button;
import com.google.android.gms.analytics.HitBuilders;
import com.google.android.gms.analytics.Tracker;

公共类MainActivity扩展了AppCompatActivity {
private Tracker mTracker;

@Override
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button BTN =(Button)findViewById(R.id.BTN);
BTN.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v){
mTracker.send(new HitBuilders.EventBuilder()
.setCategory(Action)
.setAction(Share)
.build());
Intent intent = new Intent(MainActivity.this,Second.class);
startActivity(intent);
}
});


MobikulApplication mMobikulApplication =(MobikulApplication)getApplication();
mTracker = mMobikulApplication.getDefaultTracker();

String name = this.getClass()。getName();
mTracker.setScreenName(+ name);
mTracker.send(new HitBuilders.ScreenViewBuilder()。build());
}
}

以下是我的analytics_global_config.xml:

 <?xml version =1.0encoding =utf-8?> 
<资源>
<! - 应用程序名称。默认为为应用程序标签指定的名称 - >
< string name =ga_appName> XXXXX< / string>

<! - 应用程序版本。默认为在
AndroidManifest.xml中指定的android:versionName - >
< string name =ga_appVersion> 1.0< / string>

<! - - Google Play服务不可用时的调度时间段,以秒为单位。
默认期间为1800秒或30分钟 - >
< integer name =ga_dispatchPeriod> 1800< / integer>

<! - 启用空运行模式。默认为false - >
< bool name =ga_dryRun> false< / bool>
< /资源>

我在应用程序项目中添加了json。



谢谢

解决方案

div>


确保您在 Manifest


中启用 AnalyticService blockquote>

 < service android:name =com.google.android.gms.analytics.AnalyticsService
android:enabled = true
android:exported =false/>

您还没有在 GA_PROPERTY_ID code> analytics_global_config.xml



没有ID就无法跟踪

I am using google analytics but when I debug with adb show me these messages.

05-11 14:57:48.911 1681-1912/? W/GAv4-SVC: Network compressed POST connection error: java.net.ConnectException: failed to connect to ssl.google-analytics.com/127.0.0.1 (port 443) after 60000ms: isConnected failed: ECONNREFUSED (Connection refused)
05-11 14:58:43.591 7281-7281/? I/GAv4: Google Analytics 8.2.98 is starting up. To enable debug logging on a device run:
                                         adb shell setprop log.tag.GAv4 DEBUG
                                         adb logcat -s GAv4
05-11 14:58:43.631 7281-7281/? W/GAv4: AnalyticsReceiver is not registered or is disabled. Register the receiver for reliable dispatching on non-Google Play devices. See some url for instructions.
05-11 14:58:43.681 7281-7281/? D/GAv4: setLocalDispatchPeriod (sec): 60
05-11 14:58:43.681 7281-7330/? W/GAv4: AnalyticsService not registered in the app manifest. Hits might not be delivered reliably. See some url for instructions.
05-11 14:58:48.131 7237-7268/? I/GAV3: Thread[GAThread,5,main]: No campaign data found.
05-11 14:59:23.171 7761-7785/? I/GAv4: Google Analytics 8.1.15 is starting up. To enable debug logging on a device run:
                                         adb shell setprop log.tag.GAv4 DEBUG
                                         adb logcat -s GAv4
05-11 14:59:23.181 7761-7785/? W/GAv4: AnalyticsReceiver is not registered or is disabled. Register the receiver for reliable dispatching on non-Google Play devices. See some url for instructions.
05-11 14:59:23.191 7761-7785/? W/GAv4: CampaignTrackingReceiver is not registered, not exported or is disabled. Installation campaign tracking is not possible. See some url for instructions.
05-11 14:59:23.191 7761-7791/? W/GAv4: AnalyticsService not registered in the app manifest. Hits might not be delivered reliably. See some url for instructions.
05-11 14:59:23.591 7817-7817/com.example.admin.helloanalytics I/GAv4: Google Analytics 8.4.87 is starting up. To enable debug logging on a device run:
                                                                        adb shell setprop log.tag.GAv4 DEBUG
                                                                        adb logcat -s GAv4
05-11 14:59:23.591 7817-7817/com.example.admin.helloanalytics D/GAv4: XML config - app name: XXXXX
05-11 14:59:23.591 7817-7817/com.example.admin.helloanalytics D/GAv4: XML config - app version: 1.0
05-11 14:59:23.591 7817-7817/com.example.admin.helloanalytics D/GAv4: XML config - dispatch period (sec): 1800
05-11 14:59:23.591 7817-7817/com.example.admin.helloanalytics D/GAv4: XML config - dry run: false
05-11 14:59:23.601 7817-7817/com.example.admin.helloanalytics D/GAv4: setLocalDispatchPeriod (sec): 1800
05-11 14:59:23.881 7817-7872/com.example.admin.helloanalytics D/GAv4: Hit delivery requested: ht=1462962563740, _s=50, _v=ma8.4.87, a=2122668187, adid=7d85460d-4d41-4d41-8225-b1499b154b44, aid=com.example.admin.helloanalytics, an=XXXXX, ate=1, av=1.0, cd=com.example.admin.helloanalytics.MainActivity, cid=577d2178-6c7e-431d-a258-cea382dd9263, sr=540x960, t=screenview, tid=UA-77544180-1, ul=en-us, v=1
05-11 14:59:23.921 7817-7872/com.example.admin.helloanalytics D/GAv4: Hit delivery requested: ht=1462962563740, _s=51, _v=ma8.4.87, a=2122668188, adid=7d85460d-4d41-4d41-8225-b1499b154b44, aid=com.example.admin.helloanalytics, an=XXXXX, ate=1, av=1.0, cd=com.example.admin.helloanalytics.MainActivity, cid=577d2178-6c7e-431d-a258-cea382dd9263, sc=start, sr=540x960, t=screenview, tid=UA-77544180-1, ul=en-us, v=1
05-11 14:59:23.991 7817-7872/com.example.admin.helloanalytics D/GAv4: Hit sent to the device AnalyticsService for delivery
05-11 14:59:24.531 7817-7872/com.example.admin.helloanalytics D/GAv4: Hit sent to the device AnalyticsService for delivery
05-11 14:59:24.801 7915-7915/? W/GAV2: Thread[main,5,main]: Need to call initialize() and be in fallback mode to start dispatch.
05-11 14:59:25.151 7964-7964/? I/GAv4: Google Analytics 8.2.98 is starting up. To enable debug logging on a device run:
                                         adb shell setprop log.tag.GAv4 DEBUG
                                         adb logcat -s GAv4
05-11 14:59:25.161 7964-7964/? W/GAv4: AnalyticsReceiver is not registered or is disabled. Register the receiver for reliable dispatching on non-Google Play devices. See some url for instructions.
05-11 14:59:25.191 7964-7964/? D/GAv4: setLocalDispatchPeriod (sec): 60
05-11 14:59:25.191 7964-8007/? W/GAv4: AnalyticsService not registered in the app manifest. Hits might not be delivered reliably. See some url for instructions.
05-11 14:59:29.771 7915-7955/? I/GAV2: Thread[GAThread,5,main]: No campaign data found.
05-11 14:59:49.111 1681-1912/? W/GAv4-SVC: Network compressed POST connection error: java.net.ConnectException: failed to connect to ssl.google-analytics.com/127.0.0.1 (port 443) after 60000ms: isConnected failed: ECONNREFUSED (Connection refused)
05-11 15:00:12.531 7817-7872/com.example.admin.helloanalytics D/GAv4: Hit delivery requested: ht=1462962612433, _s=52, _v=ma8.4.87, a=2122668189, adid=7d85460d-4d41-4d41-8225-b1499b154b44, aid=com.example.admin.helloanalytics, an=XXXXX, ate=1, av=1.0, cd=com.example.admin.helloanalytics.MainActivity, cid=577d2178-6c7e-431d-a258-cea382dd9263, ea=Share, ec=Action, sr=540x960, t=event, tid=UA-77544180-1, ul=en-us, v=1
05-11 15:00:12.621 7817-7872/com.example.admin.helloanalytics D/GAv4: Hit sent to the device AnalyticsService for delivery
05-11 15:00:12.671 7817-7872/com.example.admin.helloanalytics D/GAv4: Hit delivery requested: ht=1462962612569, _s=53, _v=ma8.4.87, a=2122668189, adid=7d85460d-4d41-4d41-8225-b1499b154b44, aid=com.example.admin.helloanalytics, an=XXXXX, ate=1, av=1.0, cd=com.example.admin.helloanalytics.Second, cid=577d2178-6c7e-431d-a258-cea382dd9263, sr=540x960, t=screenview, tid=UA-77544180-1, ul=en-us, v=1
05-11 15:00:12.691 7817-7872/com.example.admin.helloanalytics D/GAv4: Hit delivery requested: ht=1462962612569, _s=54, _v=ma8.4.87, a=2122668190, adid=7d85460d-4d41-4d41-8225-b1499b154b44, aid=com.example.admin.helloanalytics, an=XXXXX, ate=1, av=1.0, cd=com.example.admin.helloanalytics.Second, cid=577d2178-6c7e-431d-a258-cea382dd9263, sr=540x960, t=screenview, tid=UA-77544180-1, ul=en-us, v=1
05-11 15:00:12.751 7817-7872/com.example.admin.helloanalytics D/GAv4: Hit sent to the device AnalyticsService for delivery
05-11 15:00:12.791 7817-7872/com.example.admin.helloanalytics D/GAv4: Hit sent to the device AnalyticsService for delivery

Is my google analytics connect or is it true ?

Here is my MainActivity :

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import com.google.android.gms.analytics.HitBuilders;
import com.google.android.gms.analytics.Tracker;

public class MainActivity extends AppCompatActivity {
    private Tracker mTracker;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Button BTN = (Button) findViewById(R.id.BTN);
        BTN.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mTracker.send(new HitBuilders.EventBuilder()
                        .setCategory("Action")
                        .setAction("Share")
                        .build());
                Intent intent = new Intent(MainActivity.this,Second.class);
                startActivity(intent);
            }
        });


        MobikulApplication mMobikulApplication = (MobikulApplication) getApplication();
        mTracker = mMobikulApplication.getDefaultTracker();

        String name = this.getClass().getName();
        mTracker.setScreenName("" + name);
        mTracker.send(new HitBuilders.ScreenViewBuilder().build());
    }
}

And here is my analytics_global_config.xml :

<?xml version="1.0" encoding="utf-8" ?>
<resources>
    <!-- The application name. Defaults to name specified for the application label -->
    <string name="ga_appName">XXXXX</string>

    <!-- The application version. Defaults to android:versionName specified in the
      AndroidManifest.xml -->
    <string name="ga_appVersion">1.0</string>

    <!-- The dispatching period in seconds when Google Play services is unavailable. The
    default period is 1800 seconds or 30 minutes -->
    <integer name="ga_dispatchPeriod">1800</integer>

    <!-- Enable dry run mode. Default is false -->
    <bool name="ga_dryRun">false</bool>
</resources>

And I add json in my app project.

If need to see all project I can show it.

Thanks

解决方案

Make sure you have AnalyticService enable in Manifest

   <service android:name="com.google.android.gms.analytics.AnalyticsService"
            android:enabled="true"
            android:exported="false"/>

And you haven't specify the GA_PROPERTY_ID(Tracking ID) in analytics_global_config.xml

you can't track without an ID

这篇关于Android - AnalyticsReceiver未注册或被禁用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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