一尘不染

运行“ flutter升级”后出错

flutter

运行后出现以下错误flutter upgrade

由于来自sdk的flutter_test的每个版本都取决于路径1.5.1,而flutter_advanced_networkimage> = 0.2.9
+ 1取决于路径^ 1.6.0,因此来自sdk的flutter_test与flutter_advanced_networkimage> = 0.2.9
+ 1不兼容。因此,由于testapp同时依赖sdk中的flutter_advanced_networkimage ^
0.2.10和flutter_test,因此版本解析失败。pub升级失败(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

我试图使其工作数小时,请帮助


阅读 434

收藏
2020-08-13

共1个答案

一尘不染

我假设您正在使用Beta频道。
我认为这不会在dev频道中发生。

要切换到dev通道,请在命令行外壳中运行

flutter channel dev 
flutter doctor

然后再试一次。

2020-08-13