Android Studio坚持解决Flutter中的依赖项

时间:2018-07-03 18:38:02

标签: android-studio dart flutter

我正在开发一个项目,该项目需要在pubspec.yaml中添加的一些依赖项

  dependencies:

  flutter:

    sdk: flutter

  google_sign_in: "^0.3.1"

  firebase_auth: "^0.2.3"


  http: "^0.11.3+16"

  # The following adds the Cupertino Icons font to your application.

  # Use with the CupertinoIcons class for iOS style icons.

  cupertino_icons: ^0.1.0

  flutter_markdown: "^0.1.5"

  url_launcher: "^3.0.1"

  share: "^0.4.0"

当我单击pubspec.yaml中的Packages Get时,它会显示

C:\Flutter\bin\flutter.bat --no-color packages get

Running "flutter packages get" in list_drag_drop...

Process finished with exit code 0

当我单击pubspec.yaml中的Get Dependencies时,它会显示

Working dir: D:\Flutter proj downloaded\list_drag_drop

C:\Flutter\bin\cache\dart-sdk\bin\pub.bat get

Resolving dependencies...

Because share 0.4.0 requires the Flutter SDK and no versions of share match>0.4.0 <0.5.0, share ^0.4.0 is forbidden.

因此,由于list_drag_drop依赖于共享^ 0.4.0,因此版本解析失败。

Flutter用户应运行flutter packages get而不是pub get。 流程结束,退出代码为1

当我运行我的项目时,它卡在了解决依赖项上。 请有人帮助,我已经用谷歌搜索了,但是不能解决问题。我已经安装了flutter和dart插件。

0 个答案:

没有答案