firebase auth 中的平台异常

发布于 2025-01-10 08:56:09 字数 916 浏览 0 评论 0原文

错误:参数类型“Object”无法分配给参数类型“PlatformException”。

  • “对象”来自“dart:core”。
  • “PlatformException”来自“package:flutter/src/services/message_codec.dart”(“../../snap/flutter/common/flutter/packages/flutter/lib/src/services/message_codec.dart”)。 platformExceptionToFirebaseAuthException(异常), ^

失败:构建因异常而失败。

  • 地点: 脚本'/home/e-tech/snap/flutter/common/flutter/packages/flutter_tools/gradle/flutter.gradle'行:1102

  • 出了什么问题: 任务“:app:compileFlutterBuildDebug”执行失败。

处理'命令'/home/e-tech/snap/flutter/common/flutter/bin/flutter''以非零退出值1完成

  • 尝试: 使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。使用 --scan 运行以获得完整的见解。

  • 访问 https://help.gradle.org

    获取更多帮助

13 秒内构建失败 异常:Gradle 任务 assembleDebug 失败,退出代码为 1

Error: The argument type 'Object' can't be assigned to the parameter type 'PlatformException'.

  • 'Object' is from 'dart:core'.
  • 'PlatformException' is from 'package:flutter/src/services/message_codec.dart' ('../../snap/flutter/common/flutter/packages/flutter/lib/src/services/message_codec.dart').
    platformExceptionToFirebaseAuthException(exception),
    ^

FAILURE: Build failed with an exception.

  • Where:
    Script '/home/e-tech/snap/flutter/common/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1102

  • What went wrong:
    Execution failed for task ':app:compileFlutterBuildDebug'.

Process 'command '/home/e-tech/snap/flutter/common/flutter/bin/flutter'' finished with non-zero exit value 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 13s
Exception: Gradle task assembleDebug failed with exit code 1

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

最舍不得你 2025-01-17 08:56:09

看一下您要使用的对象是否来自 Firebase 包或来自 Dart,在本例中您使用的是 dart:core,但也有 firebase_core。

我假设您正在使用一个以对象作为参数的类,如果我看到代码会很好,但如果不起作用,请使用动态,然后一路上您会找出问题所在。

take a look if you that Object that you want to use is from Firebase package or from Dart, in this case you are using dart:core but there's also firebase_core.

I assume you are using a class upon which it takes an Object as an argument, would be good if i see the code, but if is not working put dynamic instead and then along the way you'll figure out what's the issue.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文