【问题标题】:I get this error importing firebase_auth: Target of URI doesn't exist: 'package:firebase_auth/firebase_auth.dart'导入 firebase_auth 时出现此错误:URI 目标不存在:'package:firebase_auth/firebase_auth.dart'
【发布时间】:2021-12-25 07:13:25
【问题描述】:

这是我无法导入的包:firebase_auth: ^3.2.0

我尝试导入不同版本的它也很干净。我还尝试了flutter pub getflutter pub upgradeflutter pub outdated,但都没有成功。我重新启动了 IDE 几次,甚至创建了一个新项目,但在 VS Code 和 Android Studio 中仍然出现相同的错误。

这是我的 pubspect.yaml

    version: 1.0.0+1

environment:
  sdk: ">=2.12.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

  cupertino_icons: ^1.0.2
  animated_text_kit: ^4.2.1
  firebase_core: ^1.10.0
  cloud_firestore: ^3.1.0
  firebase_auth: ^3.2.0

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_lints: ^1.0.0

flutter:
  uses-material-design: true

  assets:
    - images/

【问题讨论】:

    标签: firebase flutter firebase-authentication


    【解决方案1】:

    我同时使用了旧版本的 firebase_core 和 firebase_auth,我的问题已解决。

    firebase_core: ^1.0.0
    firebase_auth: ^1.0.0
    

    【讨论】:

    • 正如目前所写,您的答案尚不清楚。请edit 添加其他详细信息,以帮助其他人了解这如何解决所提出的问题。你可以找到更多关于如何写好答案的信息in the help center
    猜你喜欢
    • 2021-05-20
    • 2021-10-14
    • 2015-09-09
    • 1970-01-01
    • 1970-01-01
    • 2019-04-12
    • 2020-09-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多