Google Play服务15.0.0及更高版本中缺少com.google.android.gms.internal.measurement [英] com.google.android.gms.internal.measurement is missing in Google Play Services 15.0.0 and greater
问题描述
Play Services使用从版本15.0.0
开始的新版本控制方案.将Play Services分析更新到版本15.0.0
或更高版本会在我们的应用中产生编译时错误,因为已删除软件包com.google.android.gms.internal.measurement
. AppMeasurementInstallReferrerReceiver
以前在此软件包中.我们在JobIntentService
中使用AppMeasurementInstallReferrerReceiver
与Google Analytics(分析)和Firebase Analytics共享安装引荐来源. JobIntentService
用于应对Android O的背景限制,并且工作由定制安装的广播接收器排队. JobIntentReceiver
为CampaignTrackingReceiver
和AppMeasurementInstallReferrerReceiver
调用onReceive
. AppMeasurementInstallReferrerReceiver
的文档尚未已更新.必须创建一个JobIntentReceiver
来同时处理CampaignTrackingReceiver
和AppMeasurementInstallReferrerReceiver
,因为清单中只能有一个带有com.android.vending.INSTALL_REFERRER
目的过滤器的安装接收器.有什么办法可以解决这个问题,让我们保留两个安装引荐来源网址?
Play Services uses a new versioning scheme starting with version 15.0.0
. Updating Play Services analytics to version 15.0.0
or greater produces a compile-time error in our app because the package com.google.android.gms.internal.measurement
has been removed. AppMeasurementInstallReferrerReceiver
was previously in this package. We are using AppMeasurementInstallReferrerReceiver
in a JobIntentService
to share the install referrer intent with Google Analytics and Firebase Analytics. The JobIntentService
is being used to cope with Android O background restrictions and the work gets enqueued by a custom install broadcast receiver. The JobIntentReceiver
calls onReceive
for both CampaignTrackingReceiver
and AppMeasurementInstallReferrerReceiver
. The documentation for AppMeasurementInstallReferrerReceiver
has not been updated. Creating one JobIntentReceiver
to handle both CampaignTrackingReceiver
and AppMeasurementInstallReferrerReceiver
is necessary because it’s only possible to have one install receiver in the manifest with the com.android.vending.INSTALL_REFERRER
intent filter. Is there any way around this issue that will allow us to keep both install referrers?
推荐答案
似乎您的依赖树没有自动填充.
It seems that your dependency tree is not being automatically filled in.
确保您同时拥有firebase-analytics和firebase-analytics-impl.
Make sure you have both firebase-analytics and firebase-analytics-impl.
甚至更好,请使用firebase-core.它将自动提取依赖项.
Even better, use firebase-core. It will automatically pull in the dependencies.
https://mvnrepository.com/artifact/com .google.firebase/firebase-core/16.0.1
这篇关于Google Play服务15.0.0及更高版本中缺少com.google.android.gms.internal.measurement的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!