简体   繁体   中英

flutter cloud-firestore MissingPluginException Exception

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

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 (eg 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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM