当我输入pub get in flutter时,我会出现一些错误
`**Resolving dependencies...
Because every version of month_year_picker depends on flutter_localizations from sdk which depends on intl 0.18.1, every version of month_year_picker requires intl 0.18.1.
So, because assingment depends on both intl ^0.17.0 and month_year_picker ^0.2.0+3, version solving failed.**`
**Because month_year_picker <0.3.0+1 depends on intl ^0.17.0 and assingment depends on intl ^0.18.1, month_year_picker <0.3.0+1 is forbidden.
So, because assingment depends on month_year_picker ^0.2.0+3, version solving failed.**
我已经尝试过降级和升级intl包,但它仍然显示错误,我无法在android Studio中使用pub get
3条答案
按热度按时间tyky79it1#
删除其中一个冲突的软件包,然后pub get,并使用命令安装该软件包:
flutter pub add <packagename>
w8f9ii692#
1.把这个加到你的pubspec里。
1.运行
flutter pub get
ggazkfy83#
您可以使用
any
来代替特定的软件包版本,但是,特别是当您想要发布应用程序时,不建议使用any
。此外,Version Lens在这种情况下是一个有用的扩展。