Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

Firebase ML version lib class match issue #3068

Closed
rajeev-tomar06 opened this issue Dec 30, 2020 · 7 comments
Closed

Firebase ML version lib class match issue #3068

rajeev-tomar06 opened this issue Dec 30, 2020 · 7 comments

Comments

@rajeev-tomar06
Copy link

Bug Report

We are using 'https://rnfirebase.io/' for PushNotification & Analytics. After upgrading the lib we are getting the build issue on Android platform for duplicate class error. It's might be both lib camera & firebase using the firebase ML vision lib. How can we handle this situation. Can we exclude this lib -"firebase ML vision" somehow.

@russelRajitha
Copy link
Collaborator

@rajeev-tomar06 do you have any specific versions of firebase react native and other stuff?

@rajeev-tomar06
Copy link
Author

@russelRajitha Please find the details below.
"react-native-camera": "^3.31.1",

"@react-native-firebase/analytics": "^10.3.1",
"@react-native-firebase/app": "^10.3.0",
"@react-native-firebase/messaging": "^10.3.1",

=======================================

@Shashank-Yara
Copy link

+1

@HLeshan
Copy link

HLeshan commented Jan 16, 2021

manage to fix the issue by adding following

   implementation (project(':react-native-camera')) {
        exclude group: "com.google.android.gms"
        exclude group: "com.google.android.gms", module: "play-services-vision"
        exclude group: "com.google.firebase", module: "firebase-ml-vision-face-model"
    }

    implementation ("com.google.firebase:firebase-ml-vision:19.0.3") {
        force = true;
    }
    implementation ("com.google.firebase:firebase-ml-vision-face-model:17.0.2") {
        force = true;
    }

@Wasi-Ayub
Copy link

manage to fix the issue by adding following

   implementation (project(':react-native-camera')) {
        exclude group: "com.google.android.gms"
        exclude group: "com.google.android.gms", module: "play-services-vision"
        exclude group: "com.google.firebase", module: "firebase-ml-vision-face-model"
    }

    implementation ("com.google.firebase:firebase-ml-vision:19.0.3") {
        force = true;
    }
    implementation ("com.google.firebase:firebase-ml-vision-face-model:17.0.2") {
        force = true;
    }

Worked in my case <3

@tanmoythander
Copy link

tanmoythander commented Mar 25, 2021

manage to fix the issue by adding following

   implementation (project(':react-native-camera')) {
        exclude group: "com.google.android.gms"
        exclude group: "com.google.android.gms", module: "play-services-vision"
        exclude group: "com.google.firebase", module: "firebase-ml-vision-face-model"
    }

    implementation ("com.google.firebase:firebase-ml-vision:19.0.3") {
        force = true;
    }
    implementation ("com.google.firebase:firebase-ml-vision-face-model:17.0.2") {
        force = true;
    }

Added this in app/build.gradle inside dependencies and it worked like magic !!!

@roxlu
Copy link

roxlu commented Oct 21, 2021

For anyone who wants to know a bit more about this issue, I wrote down some notes while looking into this here.

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

No branches or pull requests

9 participants