Code Monkey home page Code Monkey logo

Comments (4)

TarekkMA avatar TarekkMA commented on July 22, 2024

@wabash9000 Thank you for reporting this issue. I've run the FlutterFire messaging example app found here, which uses firebase_messaging: ^15.0.2 in pubspec.yaml. The app ran without any crashes. Can you share a minimal reproducible example app where this issue occurs?

from flutterfire.

wabash9000 avatar wabash9000 commented on July 22, 2024

Alright I made a brand new flutter app, made a new firebase project, put firebase_core and firebase_messager in the pubspec.yaml file, configured the flutter project from the Firebasse CLI. Ran the project and it ran just fine and was able to get a instance token from FirebaseMessaging.

I'm trying to add the dependencies from my test project one by one to the test app and see where it fails. I added all of them and ran into an error that is probably the cause of this issue.
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)

I found a workaround for that issue by adding
configurations {
all*.exclude group: 'com.google.firebase', module: 'firebase-messaging'
}
to my app build.gradle, but that is likely the cause of this issue.

With a bit of trial and error, that issue is caused by including google_ml_kit in the pubspec.yaml, comment it out and the test project builds without issue. So there is a duplicate class conflict between google_ml_kit and firebase_messaging

from flutterfire.

wabash9000 avatar wabash9000 commented on July 22, 2024

I was able to remove the Google_ml_kit from my app and after a clean/get and rebuild I was able to get it to run without crashing. The ml kit worked in my initial tests but it was no longer working because the data matrix codes I was using it to detect were too small to pick up in the camera feed. I'm going to be converting the app to use tensorflow so I don't need the google ml kit anymore. Still a valid issue that this library has conflicts with the Google ML Kit, I just don't need it anymore.

from flutterfire.

TarekkMA avatar TarekkMA commented on July 22, 2024

@wabash9000 Glad that you were able to solve this issue. This might be a multidex issue, and you may need to enable it to fix the problem.

Closing this as I think it's a multidex issue. Please feel free to open a new issue if this is not the case.

from flutterfire.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.