com.google.android.gms.internal.measurement is missing in Google Play Services 15.0.0 and greater

回眸只為那壹抹淺笑 提交于 2019-12-24 18:34:58

问题


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 AppMeasurementInstallReferrerReceiveris 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!