Skip to content

Duplicate class com.google.firebase.iid.FirebaseInstanceIdReceiver found (BoM 31.0.0) #4206

Closed
@thatfiredev

Description

@thatfiredev

[READ] Step 1: Are you in the right place?

Issues filed here should be about bugs in the code in this repository.
If you have a general question, need help debugging, or fall into some
other category use one of these other channels:

  • For general technical questions, post a question on StackOverflow
    with the firebase tag.
  • For general Firebase discussion, use the firebase-talk
    google group.
  • For help troubleshooting your application that does not fall under one
    of the above categories, reach out to the personalized
    Firebase support channel.

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: Dolphin
  • Firebase Component: Functions, Messaging
  • Component version: BoM 31.0.0

[REQUIRED] Step 3: Describe the problem

After upgrading to the BoM 31.0.0, I see the following error in the logcat:

Duplicate class com.google.firebase.iid.FirebaseInstanceIdReceiver found in modules
firebase-iid-20.0.1-runtime (com.google.firebase:firebase-iid:20.0.1)
and firebase-messaging-23.1.0-runtime (com.google.firebase:firebase-messaging:23.1.0)

Steps to reproduce:

Add the BoM, firebase-messaging and firebase-functions dependencies:

    implementation platform('com.google.firebase:firebase-bom:31.0.0')

    implementation 'com.google.firebase:firebase-functions'
    implementation 'com.google.firebase:firebase-messaging'

A current workaround is to also define the iid version explicitly:

    implementation platform('com.google.firebase:firebase-bom:31.0.0')

    implementation 'com.google.firebase:firebase-functions'
    implementation 'com.google.firebase:firebase-messaging'
    implementation 'com.google.firebase:firebase-iid:21.1.0'

But it would be nice if the fix was implemented on the SDK itself.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions