错误:找不到方法:“FallThroughError”。抛出 FallThroughError();

Aqi*_*ina 15 firebase flutter

../../../AppData/Local/Pub/Cache/hosted/pub.dev/cloud_firestore_platform_interface-5.7.7/lib/src/platform_interface/utils/load_bundle_task_state.dart:13:13: Error: Method not found: 'FallThroughError'.
      throw FallThroughError();
            ^^^^^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/firebase_auth_platform_interface-6.10.1/lib/src/action_code_info.dart:65:15: Error: The method 'FallThroughError' isn't defined for the class 'ActionCodeInfo'.
 - 'ActionCodeInfo' is from 'package:firebase_auth_platform_interface/src/action_code_info.dart' ('../../../AppData/Local/Pub/Cache/hosted/pub.dev/firebase_auth_platform_interface-6.10.1/lib/src/action_code_info.dart').
Try correcting the name to the name of an existing method, or defining a method named 'FallThroughError'.
        throw FallThroughError();
              ^^^^^^^^^^^^^^^^
Target kernel_snapshot failed: Exception


FAILURE: Build failed with an exception.
Run Code Online (Sandbox Code Playgroud)

我不知道把 FallThroughError(); 放在哪里 方法。

小智 21

运行Flutter命令更新依赖。

flutter pub upgrade
Run Code Online (Sandbox Code Playgroud)

这应该通过更新来解决该问题,cloud_firestore_platform_interface如下所示。

cloud_firestore_platform_interface 版本更新

iOS系统

在 iOS 上,运行项目时可能会出现此错误。

CocoaPods 的规范存储库太过时,无法满足依赖关系。

为了解决这个问题,

  • 删除Podfile.lockiOS文件夹下的
  • 通过cd ios在终端中运行导航到 iOS 文件夹。
  • 运行命令pod install --repo-update

该应用程序现在应该可以正常运行。


Mun*_*Ali 4

将您的依赖项升级到最新版本它将解决您的问题。