今天我试图集成 firebase,但是当我执行 pub get 时,它抛出了我的版本错误,例如-:
C:\Src\flutter\bin\flutter.bat --no-color pub get
Running "flutter pub get" in fire...
Because firebase_auth 0.18.4+1 depends on firebase_core ^0.5.3 and no versions of firebase_auth match >0.18.4+1 <0.19.0, firebase_auth ^0.18.4+1 requires firebase_core ^0.5.3.
So, because fire depends on both firebase_auth ^0.18.4+1 and firebase_core ^0.6.0, version solving failed.
pub get failed (1; So, because fire depends on both firebase_auth ^0.18.4+1 and firebase_core ^0.6.0, version solving failed.)
Process finished with exit code 1
以下是我现在使用的依赖项...
dependencies:
flutter:
sdk: flutter
# cupertino_icons: ^1.0.1
intl:
cloud_firestore: ^0.15.0
firebase_auth: ^0.18.4+1
firebase_core: ^0.6.0
有没有人知道如何解决这种错误,因为我试图更改版本号,但随后我在核心或身份验证中显示错误...
答案 0 :(得分:1)
您可以使用any
:
dependencies:
flutter:
sdk: flutter
# cupertino_icons: ^1.0.1
intl:
cloud_firestore: ^0.15.0
firebase_auth: any
firebase_core: any