Just started this error on Android build. Please help. "Duplicate class com.google.android.gms.internal.firebase_messaging.zza found in modules jetified-firebase-iid-19.0.0-runtime.jar (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)"
Note: The 'google-services' gradle plugin is used by all Firebase SDKs, but this plugin is not related to Google Play services. Which Firebase SDKs require Google Play services?
Dependencies of Firebase Android SDKs on Google Play services. Some Firebase Android SDKs depend on Google Play services , which means they will only run on devices and emulators with Google Play...
Firebase SDKs can be divided into three categories: Play services required — These SDKs require Google Play services, otherwise they have no functionality. Play services recommended — These SDKs require Google Play services to have full functionality, but they still offer most functionality even without Google Play services.
You need to check which libs are causing the issue and do something like: implementation 'com.google.firebase:firebase-messaging:22.0.0' implementation ('com.google.firebase:firebase-iid:21.1.0') { transitive = true } In my case the problem depends on the coexistence of messaging and functions.
In build.gradle:
implementation "com.google.firebase:firebase-iid:21.1.0"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With