Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug report] Duplicate class com.google.firebase.iid.FirebaseInstanceIdReceiver found in modules jetified-firebase-iid-20.1.5-runtime and jetified-firebase-messaging-24.0.3-runtime #887

Open
qc-kgm opened this issue Oct 22, 2024 · 2 comments
Assignees

Comments

@qc-kgm
Copy link

qc-kgm commented Oct 22, 2024

I encountered a duplicate class error after importing the following dependency:

implementation 'com.google.mlkit:linkfirebase:17.0.0'

I am using the following environment:

Firebase BOM version: 33.5
Firebase Messaging version: 24.0.3

Purpose of using com.google.mlkit:linkfirebase: I am working on a custom image labeling model using TensorFlow, following the ML Kit guidelines from Google.
After adding com.google.mlkit:linkfirebase, the following error occurred:

Duplicate class com.google.firebase.iid.FirebaseInstanceIdReceiver found in modules jetified-firebase-iid-20.1.5-runtime (com.google.firebase:firebase-iid:20.1.5) and jetified-firebase-messaging-24.0.3-runtime (com.google.firebase:firebase-messaging:24.0.3)

Question:

I noticed that the last update to the linkfirebase API in the ML Kit release notes was on 01/25/2022. Is there any workaround to resolve this issue immediately? Additionally, if the root cause of this error is related to the outdated com.google.mlkit:linkfirebase library, I would like to suggest updating this library to resolve compatibility issues with the latest versions of Firebase dependencies.

Thank you very much!

SDK Info:

  • com.google.mlkit:linkfirebase:17.0.0
  • com.google.mlkit:image-labeling-custom:17.0.3
  • com.google.firebase:firebase-bom:33.5.0
  • com.google.firebase:firebase-messaging

Smartphone:
n/a

Development Environment:
n/a

@SilverDestiny
Copy link
Collaborator

Thanks for reporting the issue! We'll update com.google.mlkit:linkfirebase later to fix this issue.

In the meantime, I think you can workaround your project by adding implementation("com.google.firebase:firebase-iid:21.1.0") to your dependency. Thanks!

@qc-kgm
Copy link
Author

qc-kgm commented Nov 1, 2024

Thank you for your solution, but I have switched to using com.google.firebase:firebase-ml-modeldownloader following a newer guide from Google. It worked, so if anyone encounters the same issue, they can refer to this solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants