Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to instantiate receiver com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver

I recently updated my app on Google Play and saw a crash the error message is this:

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

The update only changed the frequency of ads, nothing else. I'm using firebase-core and firebase-ads. The crash only happens when the app is installed from the Play Store and not over adb or installing the APK on the device locally - the crash is also seems to only happen on the first open. For now, I have removed firebase-core and firebase-ads from my app and am waiting for the app to update on the store.

Update: Removing firebase-core and firebase-ads seems to have fixed the issue. Although, I would still like to have firebase in my app.

Thanks.

like image 735
t50 Avatar asked Dec 04 '16 10:12

t50


1 Answers

Google FireBase depends on Google Play Services being installed on the client device.

You need to ensure that the user has the latest Google Play Services installed on his device, and prompt him to update and/or install when needed: https://developers.google.com/android/guides/setup#ensure_devices_have_the_google_play_services_apk

And a quick code snippet that does just that: Android app requires Google Play Service Update - Open button instead of Update

like image 161
Vaiden Avatar answered Nov 15 '22 01:11

Vaiden