当前位置: 首页 > 知识库问答 >
问题:

当我运行我的应用程序(Flatter,FireBase)时,我收到此E/Flatter(25055)错误

邴墨竹
2023-03-14

我得到这个E/flutter(25055)错误时,我正在运行我的应用程序(Flutter, FireBase

我试着更新我的flutter,但仍然得到了相同的日志,这些日志使我的应用程序不稳定,应用程序崩溃了很多

E/flutter (25055): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: Bad state: field does not exist within the DocumentSnapshotPlatform
E/flutter (25055): #0      DocumentSnapshotPlatform.get._findKeyValueInMap (package:cloud_firestore_platform_interface/src/platform_interface/platform_interface_document_snapshot.dart:86:7)
E/flutter (25055): #1      DocumentSnapshotPlatform.get._findComponent (package:cloud_firestore_platform_interface/src/platform_interface/platform_interface_document_snapshot.dart:104:41)
E/flutter (25055): #2      DocumentSnapshotPlatform.get (package:cloud_firestore_platform_interface/src/platform_interface/platform_interface_document_snapshot.dart:120:26)
E/flutter (25055): #3      _JsonDocumentSnapshot.get (package:cloud_firestore/src/document_snapshot.dart:92:48)
E/flutter (25055): #4      _JsonDocumentSnapshot.[] (package:cloud_firestore/src/document_snapshot.dart:96:40)
E/flutter (25055): #5      _MyHomePageState.getLists (package:form_app/pages/home.dart:518:30)
E/flutter (25055): <asynchronous suspension>
E/flutter (25055): #6      _MyHomePageState._getUnitNamesData (package:form_app/pages/home.dart:495:33)
E/flutter (25055): <asynchronous suspension>
E/flutter (25055): 

我的颤振医生

C:\src\flatter\bin\flatter。蝙蝠医生——冗长[√] 颤振(通道稳定,2.2.3,在Microsoft Windows[Version 10.0.19041.450],locale en US]上)•颤振版本2.2。3在C:\src\flatter•框架版本f4abaa0735(7周前),2021-07-01 12:46:11-0700•发动机版本241c87ad80•Dart版本2.13。4.

[√] Android工具链-为Android设备开发(AndroidSDK版本30.0.2)•AndroidSDK位于C:/Users/afran/AppData/Local/Android/SDK•平台Android-30,构建工具30.0。2•ANDROID_HOME=C:/Users/afran/AppData/Local/ANDROID/Sdk•Java二进制文件:C:\Program Files\ANDROID\ANDROID Studio\jre\bin\Java•Java版本OpenJDK运行时环境(build 11.0.8 10-b944.6842174)•接受所有ANDROID许可证。

[√] Chrome-为web开发•Chrome位于C:\Program Files(x86)\Google\Chrome\Application\Chrome。exe

[√]Android Studio(版本4.1.0)•Android Studio at C:\Program Files\Android\Android Studio•Flutter插件可安装于:https://plugins.jetbrains.com/plugin/9212-flutter•Dart插件可安装于:https://plugins.jetbrains.com/plugin/6351-dart•Java版本OpenJDK运行时环境(构建11.0.8 10-b944.6842174)

[√]IntelliJ IDEA终极版(2020.2版)IntelliJ at F:\IntelliJ IDEA 2020.2.3 Flutter插件可从以下地点安装:https://plugins.jetbrains.com/plugin/9212-flutterDart插件可从以下地点安装:https://plugins.jetbrains.com/plugin/6351-dart

[√] VS代码(版本1.55.2)•VS代码位于C:\Users\afran\AppData\Local\Programs\Microsoft VS代码•颤振扩展版本3.21。0

[√]连接设备(2个可用)为x86(移动)构建的Android软件开发工具包模拟器-5554Androidx86Android10(API 29)(模拟器)Chrome(网络)铬网络javascript谷歌Chrome92.0.4515.131

•未发现任何问题!

我的应用依赖关系

dependencies:
  flutter:
    sdk: flutter
  flutter_spinkit: ^5.0.0
  geolocator: ^7.0.1
  #geolocation: ^1.1.2
  cloud_firestore: ^2.4.0
  firebase_storage: ^10.0.1
  permission_handler: ^8.1.4+2
  firebase_core: ^1.0.1
  url_launcher: ^6.0.2
  firebase_auth: ^3.0.1
  provider: ^5.0.0
  google_fonts: ^2.0.0
  shared_preferences: ^2.0.4
  connectivity: ^3.0.2
  mailer: ^5.0.1
  firebase_messaging: ^10.0.4
  flutter_local_notifications: ^5.0.0+1

共有1个答案

岳城
2023-03-14

例外说明了问题:

Unhandled Exception: Bad state: field does not exist within the DocumentSnapshotPlatform

你也有调用方法:

E/flutter (25055): #0      DocumentSnapshotPlatform.get._findKeyValueInMap (package:cloud_firestore_platform_interface/src/platform_interface/platform_interface_document_snapshot.dart:86:7)
E/flutter (25055): #1      DocumentSnapshotPlatform.get._findComponent (package:cloud_firestore_platform_interface/src/platform_interface/platform_interface_document_snapshot.dart:104:41)
E/flutter (25055): #2      DocumentSnapshotPlatform.get (package:cloud_firestore_platform_interface/src/platform_interface/platform_interface_document_snapshot.dart:120:26)
E/flutter (25055): #3      _JsonDocumentSnapshot.get (package:cloud_firestore/src/document_snapshot.dart:92:48)
E/flutter (25055): #4      _JsonDocumentSnapshot.[] (package:cloud_firestore/src/document_snapshot.dart:96:40)
E/flutter (25055): #5      _MyHomePageState.getLists (package:form_app/pages/home.dart:518:30)
E/flutter (25055): <asynchronous suspension>
E/flutter (25055): #6      _MyHomePageState._getUnitNamesData (package:form_app/pages/home.dart:495:33)
E/flutter (25055): <asynchronous suspension>
E/flutter (25055): 

您必须在这些行检查发生了什么。我们无法调试它,因为我们没有代码。您请求的字段不存在,因此它会引发此异常。

 类似资料: