Charts_flutter ^ 0.6.0版本解决失败

时间:2019-02-19 14:41:15

标签: flutter

从0.5.0更新chart_flutter时

日志

[myapp] flutter packages get
Running "flutter packages get" in myapp...                      
The current Dart SDK version is 2.1.0-dev.9.4.flutter-f9ebf21297.

Because charts_flutter >=0.6.0 depends on charts_common >=0.6.0 which requires SDK version >=2.1.0 <3.0.0, charts_flutter >=0.6.0 is forbidden.
So, because myapp depends on charts_flutter ^0.6.0, version solving failed.

pub get failed (1)
exit code 1

pubspec

environment:
  sdk: ">=2.0.0-dev.68.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.2
  charts_flutter: ^0.6.0

我已经尝试过的事情

  1. 干净整洁
  2. flutter更新程序包

1 个答案:

答案 0 :(得分:1)

  

当前Dart SDK版本为2.1.0-dev.9.4.flutter-f9ebf21297。

...

  

需要SDK版本> = 2.1.0 <3.0.0

2.1.0-...比<2.1.0

对于charts_flutter: ^0.6.0,您需要更新的Flutter版本。

尝试

flutter channel dev
flutter doctor
flutter packages get