我已经下载了一个 flutter 项目并将 lib、assets 和 pubsec.yaml 文件放在一个新项目中。 “flutter package get”后有1k+以上的错误。这是错误:
Because fluttermultigrocery depends on flutter_localizations any from sdk which depends
on intl 0.17.0-nullsafety.2, intl 0.17.0-nullsafety.2 is required.
So, because fluttermultigrocery depends on intl ^0.16.1, version solving failed.
pub get failed (1; So, because fluttermultigrocery depends on intl ^0.16.1, version solving failed.)
这是我的 pubsec.yaml 依赖项:
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
cupertino_icons: ^0.1.3
optimized_cached_image: ^0.1.15
cached_network_image: ^2.3.1
flutter_cache_manager: ^1.4.1 #for cached_network_image
http: ^0.12.2
provider: 4.3.2+2
connectivity: 0.4.9+2
dynamic_theme: ^1.0.1
sembast: ^2.4.7+6
path_provider: ^1.6.14
intl: ^0.16.1
shimmer: ^1.1.1
url_launcher: ^5.5.2
carousel_slider: 2.2.1
firebase_core: ^0.5.0
firebase_messaging: 7.0.0
dev_dependencies:
flutter_test:
sdk: flutter
#flutter_local_notifications:
答案 0 :(得分:0)
只需删除产生问题的依赖版本,它就会起作用 like => firebase_core:(不要指定版本) firebase_messaging:(不指定版本)