Reputation: 520
cannot use cloud firestore in flutter (android and IOS) ... I get this Exception:
E/flutter (10137): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: MissingPluginException(No implementation found for method DocumentReference#setData on channel plugins.flutter.io/cloud_firestore)
E/flutter (10137): #0 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:319:7)
E/flutter (10137): E/flutter (10137): #1 DocumentReference.setData (package:cloud_firestore/src/document_reference.dart:51:30)
E/flutter (10137): #2 _MyHomePageState.build. (package:firestoretest/main.dart:41:16)
note:
This is my pubspec.yaml file:
cloud_firestore: ^0.13.0+1
collection: ^1.14.11
firebase_core: ^0.4.3+1
I configured firebase properly and it is connected as shown in firebase console .. and able to use firebase real-time database without problems
Upvotes: 4
Views: 2618
Reputation: 1
MissingPluginException Exception:
I had this problem because I was not using the stable version of the flutter, after making the change through the command 'flutter channel stable' I was able to integrate my project with firebase.
Upvotes: 0
Reputation: 520
finally I figured out to work around the issue (keep in mind I am using flutter). Actually firebase installation wasn't perfect from the start. Even though in the documentation of firebase (for flutter) they said that explicitly we have to install the pods (ios packages), but actually we don't have to do anything related the pods other than adding an entry of the package (e.g. cloud_firestore) and execute flutter packages get
. I had to migrate the entire codebase to a new flutter project and within a few minutes, everything was fine.
Upvotes: 1