作者:无情泪看红尘 | 来源:互联网 | 2023-08-16 16:28
我每个人,我升级到 flutter 2 并出现此错误:
Because geoflutterfire 2.2.1 depends on rxdart ^0.24.1 and no versions of geoflutterfire match >2.2.1 <3.0.0, geoflutterfire ^2.2.1 requires rxdart ^0.24.1.
So, because sample_app depends on both rxdart ^0.26.0 and geoflutterfire ^2.2.1, version solving failed.
pub get failed (1; So, because sample_app depends on both rxdart ^0.26.0 and geoflutterfire ^2.2.1, version solving failed.)
颤振医生:
Doctor summary (to see all details, run flutter doctor -v):
[?] Flutter (Channel stable, 2.0.0, on macOS 11.1 20C69 darwin-x64, locale en-IL)
[?] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[!] Xcode - develop for iOS and macOS
! CocoaPods 1.9.1 out of date (1.10.0 is recommended).
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To upgrade see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[?] Chrome - develop for the web
[?] Android Studio (version 4.1)
[?] IntelliJ IDEA Community Edition (version 2019.1)
[?] Connected device (2 available)
回答
解决了:
在下面添加这一行 dev_dependencies
dependency_overrides:
plugin_platform_interface: '>=2.0.0'
intl: '>=0.17.0'
http: '>=0.13.0'
quiver: '>=2.0.0'
http_parser: '>=4.0.0'
path_provider: '>=2.0.1'
flutter_cache_manager: '>=2.1.1'
rxdart: '>=0.26.0'
**注意
不要复制我的覆盖依赖项,而是查看您遇到的错误然后覆盖它。此外,您需要关注这些插件的任何更新,如果已修复,则删除覆盖依赖项。