无法实例化接收器com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver

我最近在Google Play上更新了我的应用,看到了崩溃错误消息是这样的:

Unable to instantiate receiver com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver"

更新只改变了广告的频率,没有别的.我正在使用firebase-core和firebase-ads.
只有当应用程序从Play商店安装而不是adb或在本地设备上安装APK时才会发生崩溃 – 崩溃似乎只发生在第一次打开时.
目前,我已经从我的应用程序中删除了firebase-core和firebase-ads,并且正在等待应用程序在商店中进行更新.

更新:删除firebase-core和firebase-ads似乎解决了这个问题.虽然,我仍然希望在我的应用程序中有firebase.

谢谢.

最佳答案 Google FireBase依赖于客户端设备上安装的Google Play服务.

您需要确保用户在其设备上安装了最新的Google Play服务,并在需要时提示他进行更新和/或安装:
https://developers.google.com/android/guides/setup#ensure_devices_have_the_google_play_services_apk

一个快速的代码片段就是这样做的:
Android app requires Google Play Service Update – Open button instead of Update

点赞