Flutter2-firebase_remote_config0.6.0&firebase_core^0.7.0版本冲突
根据FlutterFire文档,我已将我的 Flutter 项目更新为 Flutter 2。
我已将我的项目转换为颤振通道测试版,并且依赖项更新如下:
不幸的是,我收到以下错误:
因为 firebase_remote_config 0.6.0 取决于 firebase_core ^0.7.0 并且没有 firebase_remote_config 版本匹配 >0.6.0 <0.7.0,firebase_remote_config ^0.6.0 需要 firebase_core ^0.7.0。所以,因为 mars_remedies 依赖于 firebase_core ^1.0.0 和 firebase_remote_config ^0.6.0,版本解析失败。pub get failed (1; 所以,因为 mars_remedies 依赖于 firebase_core ^1.0.0 和 firebase_remote_config ^0.6.0,版本解析失败。)
注意:我也尝试过使用flutter channel dev但我遇到了同样的错误。
另一个错误[更新]:
因为 flutter_local_notifications_platform_interface 2.0.0+1 依赖于 plugin_platform_interface ^1.0.2 并且没有任何版本的 flutter_local_notifications_platform_interface 匹配 >2.0.0+1 <3.0.0,所以 flutter_local_notifications_platform_interface ^2.0.0+1 需要 plugin_platform_interface ^1.0.0+1 所以,因为 mars_remedies 依赖于 flutter_local_notifications_platform_interface ^2.0.0+1 和 plugin_platform_interface ^2.0.0,版本求解失败。pub get failed (1; 所以,因为 mars_remedies 依赖于 flutter_local_notifications_platform_interface ^2.0.0+1 和 plugin_platform_interface ^2.0.0,版本求解失败。)
我的pubspec.yaml是:
# For Location Information (Getting Location Details on Login or Register)
geolocator: ^7.0.1
geolocator_platform_interface: ^2.0.0
flutter_local_notifications: ^4.0.1+1
flutter_local_notifications_platform_interface: ^2.0.0+1
plugin_platform_interface: ^2.0.0
以上所有依赖项都相互冲突。
回答
尝试firebase_remote_config: ^0.9.0-dev.0代替firebase_remote_config: ^0.6.0.
此版本不是空安全的,但已创建以允许与其他空安全 FlutterFire 包(例如 firebase_core)兼容。
https://pub.dev/packages/firebase_remote_config/versions/0.9.0-dev.0
如果它仍然相同,请尝试使用firebase_core: ^1.0.0.