我正在尝试将Firebase
添加到名为biletsatis
的Flutter App
中。
但是当我尝试pub get时,我得到了这个错误。
[biletsatis] flutter pub get
Running "flutter pub get" in biletsatis...
Resolving dependencies...
Because firebase_core >=0.7.0 <0.8.0-1.0.nullsafety.0 depends on firebase_core_platform_interface ^3.0.1 and cloud_firestore >=4.3.2 depends on firebase_core_platform_interface ^4.5.3, firebase_core >=0.7.0 <0.8.0-1.0.nullsafety.0 is incompatible with cloud_firestore >=4.3.2.
So, because biletsatis depends on both cloud_firestore ^4.4.3 and firebase_core ^0.7.0, version solving failed.
pub get failed
command: "C:\Users\USER\flutter\bin\cache\dart-sdk\bin\dart __deprecated_pub --directory . get --example"
pub env: {
"FLUTTER_ROOT": "C:\Users\USER\flutter",
"PUB_ENVIRONMENT": "vscode.dart-code:flutter_cli:get",
"PUB_CACHE": "C:\Users\USER\AppData\Local\Pub\Cache",
}
exit code: 1
exit code 1
下面是pubsec.yaml
文件中的dependencies
部分
flutter:
sdk: flutter
flutter_form_bloc: ^0.30.1
cupertino_icons: ^1.0.2
cloud_firestore: ^4.4.3
firebase_core: ^0.7.0
1条答案
按热度按时间q8l4jmvw1#
尝试使用
使用此命令,Flutter项目中的所有依赖项都将更新为最新的主要版本。