Comments (4)
@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.
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.
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.
@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)
- [firebase_auth]: Cannot auth twitter from web HOT 8
- [firebase_messaging]: getToken() does not work on Safari, works on Chrome and Firefox. 'Request contains an invalid argument' HOT 13
- Deprecated imperative apply of Flutter's Gradle plugins HOT 4
- [flutterfire]: CDN: trunk URL couldn't be downloaded: HOT 1
- [AUTH]: Inconsistent behavior when switching from emulators to server HOT 2
- [firebase_crashlytics]: flutter macOS does not terminate the app after stop debuging HOT 6
- Found some security issues HOT 3
- [firebase_auth] linkWithCredential() throws email-already-in-use exception in flutter app
- Firebase.initializeApp( options: DefaultFirebaseOptions.currentPlatform, ) intialize issue HOT 1
- [firebase_auth] authStateChanges() stream fires when read/write into firestore HOT 4
- 🐛 [firebase_massaging] Example flutter ios build is too old
- firebase_code: Duplicate Classes HOT 6
- Firebase Phone MFA not working with some numbers HOT 1
- [📚] Old Doc doesn't have sum() and average() example for flutter. HOT 1
- [Firebase storage]: iOS only - Unable to establish connection to channel, happens in Workmanager or isolate only HOT 1
- [Firebase_auth]: <When I use signInWithEmailAndPassword without first using the createUserWithEmailAndPassword method, I get the error message [firebase_auth/channel-error] "dev.flutter.pigeon.firebase_auth_platform_interface.FirebaseAuthHostApi.signInWithEmailAndPassword".> HOT 11
- 🐛 [crashlytics][release] Information from recordFlutterFatalError shows up as 'Instance of 'DiagnosticsProperty<void>'
- [firebase_app_check] App check token does not print on Android real devices HOT 6
- [firebase_auth]: [web] referencing FirebaseAuthException after running release version of app throws exception. HOT 2
- [firebase_messaging]: After turning off the device and turn back on, onBackgroundMessage is not fired on iOS. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutterfire.