简体   繁体   English

导入 firebase_auth 时出现此错误:URI 目标不存在:'package:firebase_auth/firebase_auth.dart'

[英]I get this error importing firebase_auth: Target of URI doesn't exist: 'package:firebase_auth/firebase_auth.dart'

this is the package I can't import: firebase_auth: ^3.2.0这是我无法导入的包:firebase_auth:^3.2.0

I tried importing different verions of it also flutter clean.我尝试导入它的不同版本也很干净。 I also tried flutter pub get , flutter pub upgrade , flutter pub outdated and none worked.我还尝试过flutter pub getflutter pub upgradeflutter pub outdated ,但都没有工作。 I restarted the IDE several times and even created a new project but I stil get the same error in both VS Code and Android Studio.我重新启动了 IDE 几次,甚至创建了一个新项目,但我仍然在 VS Code 和 Android Studio 中遇到相同的错误。

Here is my pubspect.yaml这是我的 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/

I used both older versions of firebase_core & firebase_auth and my issue resolved.我使用了旧版本的 firebase_core 和 firebase_auth,我的问题解决了。

firebase_core: ^1.0.0
firebase_auth: ^1.0.0

暂无
暂无

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

相关问题 AssertionError ('package:firebase_auth/src/firebase_auth.dart': 断言失败: line 780 pos 7: 'phoneNumber:= null || multiFactorInfo != null': Ei - AssertionError ('package:firebase_auth/src/firebase_auth.dart': Failed assertion: line 780 pos 7: 'phoneNumber != null || multiFactorInfo != null': Ei flutter:'package:firebase_auth/src/firebase_auth.dart':断言失败:第 487 行 pos 12:'email:= null':不正确 - flutter: 'package:firebase_auth/src/firebase_auth.dart': Failed assertion: line 487 pos 12: 'email != null': is not true Dart Flutter 顺序 firebase_auth 错误 - Dart Flutter sequential firebase_auth errors GeneratedPluginConstraint,致命错误:找不到模块“firebase_auth”@import firebase_auth; - GeneratedPluginConstraint , Fatal error: module 'firebase_auth' not found @import firebase_auth; 致命错误:找不到模块“firebase_auth”@import firebase_auth - fatal error: module 'firebase_auth' not found @import firebase_auth 无法在 firebase 中注册用户(firebase_auth/unknown: null) - Can't register user in firebase (firebase_auth/unknown: null) Firebase_auth 取决于 firebase_core 错误 - Firebase_auth depends on firebase_core error Flutter firebase_auth signInWithCredential 不适用于 android - Flutter firebase_auth signInWithCredential is not working on android 如何从 firebase_auth 测试“signInWithEmailAndPassword” - How to test "signInWithEmailAndPassword" from firebase_auth 单元测试 firebase_auth 和 firestore - Unit Testing firebase_auth and firestore
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM