今天编译我的项目时,它显示了这个错误:
The current Dart SDK version is 2.10.5.
Because Cruise depends on intl >=0.17.0-nullsafety which requires SDK version >=2.11.0-180.0.dev <3.0.0, version solving failed.
pub get failed (1; Because Cruise depends on intl >=0.17.0-nullsafety which requires SDK version >=2.11.0-180.0.dev <3.0.0, version solving failed.)
Process finished with exit code 1
这是我的国际依赖项:
intl: 0.17.0
我没有添加 intl >=0.17.0-nullsafety
依赖项。为什么会出现这个错误,我应该怎么做才能修复它?这是完整的pubspec.yaml
:
name: Cruise
description: A RSS article read Flutter application.
publish_to: 'none'
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
intl: 0.17.0
meta: ^1.1.8
flutter_svg: 0.19.0
logger: 0.9.4
scoped_model: ^1.1.0
shrine_images: ^1.1.2
flare_dart: 2.3.4
flare_flutter: ^2.0.2
vector_math: ^2.0.8
collection: ^1.14.0
package_info: ^0.4.0
fluttertoast: 7.1.6
#google_fonts: 1.0.0
flutter_staggered_grid_view: ^0.3.0
adaptive_breakpoints: ^0.0.2
cupertino_icons: 1.0.0
http: ^0.12.0+2
flutter_icons: ^1.0.0
timeago: 2.0.26
animations: 1.1.2
flutter_hooks: ^0.12.0
share: ^0.6.4+3
shimmer: 1.1.1
crypto: 2.1.5
url_launcher: 5.5.0
uni_links: 0.4.0
flutter_html: 1.2.0
shared_preferences: ^0.5.8
state_notifier: ^0.5.0
flutter_secure_storage: 3.3.3
flutter_slidable: "^0.5.5"
hive: ^1.4.1+1
#fluwx: ^2.4.1
pull_to_refresh: 1.6.3
intl_phone_number_input: ^0.5.0
dio: 3.0.10
fish_redux: 0.3.4
hive_flutter: 0.3.1
dev_dependencies:
flutter_test:
sdk: flutter
test:
path:
args:
grinder: ^0.8.0
pedantic: ^1.9.0
string_scanner: ^1.0.5
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
generate: true
答案 0 :(得分:1)
如果您已将 flutter 更新到最新版本,则在您的 pubspec.yaml
中应该有以下行:
environment:
sdk: ">=2.12.0 <3.0.0"