运行 "flutter upgrade" 后出错
Error after running "flutter upgrade"
我在 运行 flutter upgrade
之后收到以下错误:
Because every version of flutter_test from sdk depends on path 1.5.1 and flutter_advanced_networkimage >=0.2.9+1 depends on path ^1.6.0, flutter_test from sdk is incompatible with flutter_advanced_networkimage >=0.2.9+1.
So, because testapp depends on both flutter_advanced_networkimage ^0.2.10 and flutter_test any from sdk, version solving failed.
pub upgrade failed (1)
我的pubspec.yaml
:
name: testapp
description: A new Flutter application.
dependencies:
flutter:
sdk: flutter
device_info: "^0.2.0"
shared_preferences: "^0.4.1"
flutter_parallax: "^0.1.1"
cached_network_image: "^0.4.1"
connectivity: "^0.3.1"
chewie: "^0.6.0"
flutter_statusbarcolor: "^0.0.3"
fluro: "^1.3.1"
carousel_slider: "^0.0.4"
flutter_advanced_networkimage: "^0.2.10"
flutter_sticky_header: "^0.3.0"
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
我正在尝试让它工作几个小时,请帮忙
我假设您使用的是 Beta 频道。
我认为 dev
频道不会发生这种情况。
在命令行中切换到 dev
频道 运行 shell
flutter channel dev
flutter doctor
然后重试。
我遇到过类似的问题。我的问题是这样的:
Because every version of flutter_test from sdk depends on http 0.12.0
and flutter_cache_manager 0.1.2 depends on http ^0.11.3+14,
flutter_test from sdk is incompatible with flutter_cache_manager
0.1.2. And because no versions of flutter_cache_manager match >0.1.2 <0.2.0, flutter_test from sdk is incompatible with
flutter_cache_manager ^0.1.2.
我是这样解决的:
dependencies:
...
dependency_overrides:
http: ^0.12.0
所以,谢谢你可以尝试一下:
dependencies:
...
dependency_overrides:
path: ^1.6.0
我在 运行 flutter upgrade
之后收到以下错误:
Because every version of flutter_test from sdk depends on path 1.5.1 and flutter_advanced_networkimage >=0.2.9+1 depends on path ^1.6.0, flutter_test from sdk is incompatible with flutter_advanced_networkimage >=0.2.9+1. So, because testapp depends on both flutter_advanced_networkimage ^0.2.10 and flutter_test any from sdk, version solving failed. pub upgrade failed (1)
我的pubspec.yaml
:
name: testapp
description: A new Flutter application.
dependencies:
flutter:
sdk: flutter
device_info: "^0.2.0"
shared_preferences: "^0.4.1"
flutter_parallax: "^0.1.1"
cached_network_image: "^0.4.1"
connectivity: "^0.3.1"
chewie: "^0.6.0"
flutter_statusbarcolor: "^0.0.3"
fluro: "^1.3.1"
carousel_slider: "^0.0.4"
flutter_advanced_networkimage: "^0.2.10"
flutter_sticky_header: "^0.3.0"
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
我正在尝试让它工作几个小时,请帮忙
我假设您使用的是 Beta 频道。
我认为 dev
频道不会发生这种情况。
在命令行中切换到 dev
频道 运行 shell
flutter channel dev
flutter doctor
然后重试。
我遇到过类似的问题。我的问题是这样的:
Because every version of flutter_test from sdk depends on http 0.12.0 and flutter_cache_manager 0.1.2 depends on http ^0.11.3+14, flutter_test from sdk is incompatible with flutter_cache_manager 0.1.2. And because no versions of flutter_cache_manager match >0.1.2 <0.2.0, flutter_test from sdk is incompatible with flutter_cache_manager ^0.1.2.
我是这样解决的:
dependencies:
...
dependency_overrides:
http: ^0.12.0
所以,谢谢你可以尝试一下:
dependencies:
...
dependency_overrides:
path: ^1.6.0