Flutter插件安装问题

时间:2019-06-11 21:23:52

标签: flutter flutter-dependencies

对不起,我的英语不好 我想安装以下插件,但我不知道为什么会出错。

插件:

  http: ^0.12.0+2
  shared_preferences: ^0.5.3+1
  flutter_html_view: ^0.5.11

错误:

Running "flutter packages get" in alimelodi...                  
Because no versions of flutter_html_view match >0.5.11 <0.6.0 and flutter_html_view 0.5.11 depends on cached_network_image ^0.5.0+1, flutter_html_view ^0.5.11 requires cached_network_image ^0.5.0+1.
And because cached_network_image >=0.5.0+1 <0.6.0-alpha depends on flutter_cache_manager ^0.2.0+1, flutter_html_view ^0.5.11 requires flutter_cache_manager ^0.2.0+1.
Because flutter_cache_manager 0.2.0+1 depends on shared_preferences ^0.4.0 and no versions of flutter_cache_manager match >0.2.0+1 <0.3.0, flutter_cache_manager ^0.2.0+1 requires shared_preferences ^0.4.0.
Thus, flutter_html_view ^0.5.11 requires shared_preferences ^0.4.0.
So, because alimelodi depends on both flutter_html_view ^0.5.11 and shared_preferences ^0.5.3+1, version solving failed.

pub get failed (1)

1 个答案:

答案 0 :(得分:0)

该错误很容易解释。 flutter_html_viewmultiple times已报告了一个依赖项解决问题,维护人员应对其进行升级以解决该问题。

暂时,我建议您自己分叉并更新pubspec.yaml中的flutter_cache_manager,或者只使用已经做过的人替换它。例如:

flutter_html_view:
    git: https://github.com/arifnyet/FlutterHtmlView.git