简体   繁体   English

“错误:找不到成员”与 Flutter Firebase 授权 package

[英]"Error: Member not found" with Flutter Firebase Auth package

 /Flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth_platform_interface-6.2.0/lib/src/method_channel/utils/exception.dart:14:11: Error: Member not found: 'Error.throwWithStackTrace'.
 Error.throwWithStackTrace(exception, stackTrace);
       ^^^^^^^^^^^^^^^^^^^
/Flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth_platform_interface-6.2.0/lib/src/method_channel/utils/exception.dart:17:9: Error: Member not found: 'Error.throwWithStackTrace'.
Error.throwWithStackTrace(
     ^^^^^^^^^^^^^^^^^^^
/D:/Flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth_platform_interface-6.2.0/lib/src/method_channel/utils/exception.dart:12:7: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.

Never convertPlatformException(Object exception, StackTrace stackTrace) {
   ^
FAILURE: Build failed with an exception.

My pubsec.yaml has only:我的 pubsec.yaml 只有:

  • cloud_firestore: cloud_firestore:
  • firebase_core: firebase_core:
  • uuid: uuid:
  • firebase_auth: ^3.3.8 firebase_auth:^3.3.8
  • provider: ^6.0.2提供商:^6.0.2

I got this error after importing firebase packages.导入 firebase 个包后出现此错误。

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel master, 2.6.0-12.0.pre.657, on Microsoft Windows [Version 10.0.19044.1526], locale en-IN)
[√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[√] Chrome - develop for the web
[√] Android Studio (version 2020.3)
[√] Android Studio (version 2021.1)
[√] Connected device (3 available)

• No issues found!

For me.对我来说。 upgrading flutter resolved the issue.升级 flutter 解决了这个问题。 flutter upgrade

I tried using latest version but It didn't worked.我尝试使用最新版本,但没有用。 Lower version firebase_auth: 2.0.0 worked for me.较低版本的firebase_auth: 2.0.0对我有用。

firebase now has dependencies using Dart 2.16. firebase现在具有使用 Dart 2.16 的依赖项。 Similar issue & solutions here 类似的问题和解决方案在这里

I had the same issue.我遇到过同样的问题。 So I updated my flutter version(2.2.2) to a newer version(2.10.4) and it resolved the issue.所以我将我的 flutter 版本 (2.2.2) 更新为更新版本 (2.10.4),它解决了这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 firebase_auth.dart:18:67:错误:找不到成员,如何解决这个 flutter firebase 错误? - firebase_auth.dart:18:67: Error: Member not found, How to solve this flutter firebase error? 在 flutter UI 中显示 firebase 身份验证错误代码 - Showing firebase auth error codes in flutter UI Flutter Firebase Auth Exception 的错误代码是什么? - what are the error codes for Flutter Firebase Auth Exception? Flutter firebase 桌面授权 - Flutter firebase auth for desktop Firebase Auth 在 Flutter 中不起作用 - Firebase Auth not working in Flutter Firebase 错误:找不到模块:错误:包路径。 不从包中导出 - Firebase Error : Module not found: Error: Package path . is not exported from package GeneratedPluginConstraint,致命错误:找不到模块“firebase_auth”@import firebase_auth; - GeneratedPluginConstraint , Fatal error: module 'firebase_auth' not found @import firebase_auth; Firebase 错误:找不到模块:错误:Package 路径。 不从 package 导出 - Firebase Error : Module not found: Error: Package path . is not exported from package Flutter:MissingPluginException(未在通道插件上找到方法 createUserWithEmailAndPassword 的实现。flutter.io/firebase_auth) - Flutter: MissingPluginException(No implementation found for method createUserWithEmailAndPassword on channel plugins.flutter.io/firebase_auth) Flutter Firebase 认证很慢 - Flutter Firebase Auth very slow
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM