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

Android Firebase Conflict - FAILURE: Build failed with an exception. #653 #849

Open
simeonangelov94 opened this issue Jul 11, 2024 · 5 comments
Assignees

Comments

@simeonangelov94
Copy link

There is a conflict between the firebase dependencies and the google_mlkit_object_detection: ^0.13.0 package. If I don't add the google_mlkit_object_detection package the app compiles without an issue

cloud_firestore: ^5.0.2
firebase_auth: ^5.1.1
firebase_storage: ^12.1.0
firebase_core: ^3.1.1
firebase_messaging: ^15.0.2
firebase_app_check: ^0.3.0+2
google_mlkit_object_detection: ^0.13.0

FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':app:checkReleaseDuplicateClasses'.
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
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.0-runtime (com.google.firebase:firebase-messaging:24.0.0)

The conflict comes from having firebase_messaging: ^15.0.2 and google_mlkit_object_detection: ^0.13.0 packages in the yaml. When firebase_messaging: ^15.0.2 is removed there is no issue compiling for Android. Tried different build.gradle configuration but couldn't fix it.

@galizhan
Copy link

same issue

@ai-plays
Copy link
Collaborator

The latest ML Kit Object Detection API for Android is https://developers.google.com/ml-kit/vision/object-detection/android with latest version as 'com.google.mlkit:object-detection:17.0.1'

I don't have full context at the moment but just to provide some quick info hoping to help unblock you: Is google_mlkit_object_detection: 0.13.0 a branch in firebase? Did you check with any firebase support channel?

@gabbygreat
Copy link

gabbygreat commented Jul 17, 2024

I don't have google_mlkit_object_detection plugin in my pubspec.yaml file, but, I am facing the same issue.
However, I do have google_ml_kit

firebase_messaging: ^15.0.3
google_ml_kit: ^0.18.0
Flutter 3.22.2

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:checkDebugDuplicateClasses'.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
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.0-runtime (com.google.firebase:firebase-messaging:24.0.0)

@gabbygreat
Copy link

google_mlkit_text_recognition: ^0.13.0
google_mlkit_face_detection: ^0.11.0
firebase_messaging: ^15.0.3

This worked just fine for me ✅

@songsh167
Copy link

try this one ...
implementation('com.google.firebase:firebase-iid:21.1.0')

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

6 participants