Flutter Packages Get Failed

烈酒焚心 提交于 2020-08-09 01:32:07

问题


I am trying to add this library to my flutter project: https://pub.dartlang.org/packages/charts_flutter#-installing-tab-

When I add the dependency to my pubspec.yaml file and hit packages get, I get the following error:

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 undaunted_golf_flutter depends on charts_flutter ^0.6.0, version solving failed.

pub get failed (1) Process finished with exit code 1

To me, it looks like I have the most up to date version of Dart, which matches the minimum version the chart_common library requires. I updated my Android Studio yesterday (2/15/2019), the same day the charts_flutter and charts_common were updated.

What am I missing here?


回答1:


The current Dart SDK version is 2.1.0-dev.9.4.flutter-f9ebf21297.

... charts_flutter ... requires SDK version >=2.1.0 <3.0.0

This means you need to update your Flutter installation.

Either flutter upgrade or if that doesn't result in a new enough Flutter version,

use

flutter channel dev
flutter doctor

or alternatively use an older charts_flutter version than >=0.6.0 that does not depend on <= 2.1.0-dev



来源:https://stackoverflow.com/questions/54724456/flutter-packages-get-failed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!