当我试图从文本字段向Firebase输入一些信息时,遇到了一个问题。我得到这个错误:
Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null)
我试图更新我的依赖项,但它们都是最新的。有人遇到同样的问题并解决了吗?
尝试在没有版本的情况下将firebase_core_platform_interface依赖项添加到应用程序的pubspec.yaml文件:
像这样:
dependencies:
........
........
firebase_core_platform_interface:
然后在CLI/Terminal
的flutter clean
之后进行pub get
。
如果仍然不起作用,请将文件pubspec.lock
重命名为pubspec_ORG.lock
,然后:
从CLI/Terminal
:运行所有这些
flutter pub outdated
flutter upgrade outdated_package
flutter clean
flutter pub get
希望这能有所帮助。
PS:将文件pubspec.lock
重命名为pubspec_ORG.lock will help you revert to the original
pubspec.lock`文件,以备不时之需。