Skip to content

[Bug] Duplicate class com.google.android.gms.internal.firebase_messaging.zza found in modules jetified-firebase-iid-20.0.1-runtime.jar (com.google.firebase:firebase-iid:20.0.1) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0) #1093

@mikeypdev

Description

@mikeypdev

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2020.3.6f1
  • Firebase Unity SDK version: 8.0.0
  • Source you installed the SDK: Unity Package Manager
  • Problematic Firebase Component: InstanceID
  • Other Firebase Components in use: Analytics, Auth, Crashlytics, Database, DynamicLinks, Functions, Messagin, RemoteConfig, Storage
  • Additional SDKs you are using: Unity IAP
  • Platform you are using the Unity editor on: Mac
  • Platform you are targeting: Android, iOS
  • Scripting Runtime: IL2CPP

[REQUIRED] Please describe the issue here:

Firebase Instance ID is deprecated, and I was not using it, so I removed the Instance ID SDK from my project when updating to SDK 8.0.0. In SDK 7.2.0, Instance ID implemented firebase-iid:21.1.0 on Android, as seen in mainTemplate.gradle. After removing Instance ID, and upgrading all other Firebase components to 8.0.0, there are no references to firebase-iid in mainTemplate.gradle or AndroidResolverDependecies.xml, as expected.

However, when building to Android, the gradle build fails with the following error:
Duplicate class com.google.android.gms.internal.firebase_messaging.zza found in modules jetified-firebase-iid-20.0.1-runtime.jar (com.google.firebase:firebase-iid:20.0.1) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
I do not know where the reference to firebase-iid:20.0.1 is coming from.

As a workaround, I am able to solve the build error by manually adding a reference to firebase-iid:21.1.0 to my mainTemplate.gradle file:
implementation 'com.google.firebase:firebase-iid:21.1.0'

This is reproducible 100% of the time in my project, on two different development systems. I have not yet had the bandwidth to repro in any Quickstart example.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions