当我尝试从文本字段向 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:
然后在 flutter clean
之后从 CLI/Terminal
执行 pub get
。
如果仍然不起作用,请将文件 pubspec.lock
重命名为 pubspec_ORG.lock
,然后:
从CLI/终端
运行所有这些:
flutter pub 已过时
flutter 升级 outdated_package
flutter 干净
flutter pub 获取
希望这有帮助。
PS:将文件 pubspec.lock
重命名为 pubspec_ORG.lock 将帮助您在需要时恢复到原始
pubspec.lock` 文件。
关于Flutter - Firebase,未处理的异常 : PlatformException(channel-error, 无法在 channel 上建立连接。,null,null),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73123443/