问题
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?
回答1:
It seems that your dependency tree is not being automatically filled in.
Make sure you have both firebase-analytics and firebase-analytics-impl.
Even better, use firebase-core. It will automatically pull in the dependencies.
https://mvnrepository.com/artifact/com.google.firebase/firebase-core/16.0.1
来源:https://stackoverflow.com/questions/51514926/com-google-android-gms-internal-measurement-is-missing-in-google-play-services-1