firebase – 在AndroidX迁移后Firestore损坏
发布时间:2020-12-14 14:50:23 所属栏目:百科 来源:网络整理
导读:我刚刚迁移到 AndroidX并更新了我的Flutter依赖项. 我现在在使用Firestore时遇到错误. 例如: //try { await ref.collection(‘collection’).document(document).updateData({ 'Field’: field,});//} catch (e) {// debugPrint(e.toString());//} 冻结应用
我刚刚迁移到
AndroidX并更新了我的Flutter依赖项.
我现在在使用Firestore时遇到错误. 例如: //try { await ref.collection(‘collection’).document(document).updateData({ 'Field’: field,}); //} catch (e) { // debugPrint(e.toString()); //} 冻结应用程序并给出堆栈错误: StandardMethodCodec.decodeEnvelope (message_codecs.dart:564) MethodChannel.invokeMethod (platform_channel.dart:292) _RootZone.runUnary (zone.dart:1379) _FutureListener.handleValue (future_impl.dart:126) _Future._propagateToListeners.handleValueCallback (future_impl.dart:639) _Future._propagateToListeners (future_impl.dart:668) _Future._completeWithValue (future_impl.dart:483) _Future._asyncComplete.<anonymous closure> (future_impl.dart:513) _microtaskLoop (schedule_microtask.dart:41) _startMicrotaskLoop (schedule_microtask.dart:50) message_codecs break on exception(564)是: throw PlatformException(code: errorCode,message: errorMessage,details: errorDetails); 当catch错误错误是: PlatformException(Error 0,null,null) 我用的是: cloud_firestore: ^0.9.0+2 (firebase_auth: ^0.8.1+1) (google_sign_in: ^4.0.1+1) (firebase_messaging: ^3.0.1) 在Android上没有同样的问题. 感谢帮助! 更新:这与https://github.com/flutter/flutter/issues/28103不同.删除等待不修复冻结/问题. 解决方法
我遇到了同样的问题.
这是v0.9.0 2的错误. 它通过使用以前版本的cloud_firestore解决了它. cloud_firestore: git: url: git://github.com/flutter/plugins.git path: packages/cloud_firestore ref: 51696552700af8692fd7d595237fc9c4e273de93 Flutter似乎认为1和2是相同的版本. >删除.pub-cache /,>指定以上版本>扑动包得到> cloud_firestore:0.9.0 1>扑动包得到 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
推荐文章
站长推荐
热点阅读