本文介绍了Firebase分析AppMeasurement未启用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我已按照所有说明在我的项目中正确集成Firebase分析.但是,当我启用调试日志记录以确保事件已发送时(使用此处)我看到

I have followed all the instructions for integrating Firebase analytics correctly in my project. But when I enable debug logging to make sure the events are being sent (using instructions from here) I see

E/FA      ( 3556): AppMeasurementReceiver not registered/enabled
E/FA      ( 3556): AppMeasurementService not registered/enabled
E/FA      ( 3556): Uploading is not possible. App measurement disabled

显然事件没有发送.

我再次遵循了所有说明.

Again I have followed all the instructions .

推荐答案

事实证明,Firebase库具有一个Android Manifest文件,其中定义了以下节点:

It turns out that Firebase Library has an Android Manifest file in which it defines these nodes:

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

 <receiver android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
     android:enabled="true">
     <intent-filter>
         <action android:name="com.google.android.gms.measurement.UPLOAD" />
     </intent-filter>
 </receiver>

基于 AppMeasurementService AppMeasurementReceiver

分析工作需要这些,而我的问题是我在Android Manifest中用<tools:node=replace>替换了所有库节点,而这又忽略了分析库所需的节点.

which are needed for analytics to work and my problem was that I was replacing all the library nodes with <tools:node="replace"> in my Android Manifest which in turn ignored the needed nodes for analytics lib.

删除<tools:node=replace>并替换我的冲突专门解决了我的问题.

Removing <tools:node="replace"> and replacing my conflicts specifically solved my problem.

这篇关于Firebase分析AppMeasurement未启用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 12:18