我将 flutter
更新到版本 1.25.0-8.1.pre- 后收到此错误
Because `easy_localization` >=2.1.0+1 depends on `flutter_localizations` any from sdk which depends on `intl` 0.17.0-nullsafety.2, `easy_localization` >=2.1.0+1 requires `intl` 0.17.0-nullsafety.2.
So, because news_app depends on both `easy_localization` ^2.3.3 and `intl` ^0.16.1, version solving failed.
pub get failed (1; So, because news_app depends on both `easy_localization` ^2.3.3 and `intl` ^0.16.1, version solving failed.)
我安装了 easy_localization
2.3.3、intl
0.16.0 和 dart
2.12.0。请帮忙
答案 0 :(得分:3)
基本上发生的事情是 minorversion=21
使用了一个使用更新版本的 easy_localization
的包。基本上,您要求包管理器处理同一个包的两个版本,有两种解决方案。
将 intl
包降级到使用相同 intl 版本的版本(不推荐)
将您的 intl 版本升级到 easy_localization
(推荐,但空安全仍处于测试阶段,因此您必须注意这一点)
祝您有美好的一天!
答案 1 :(得分:0)
我认为这是解决此问题的最佳方法, 您需要通过运行
将您的颤振通道切换到稳定版本flutter channel stable
在命令行中。这会将您的频道切换到稳定版本并消除错误。
我希望这能最好地解决您的问题。