【问题标题】:package install carousel_pro 1.0.0 in pubspec.yaml在 pubspec.yaml 中包安装 carousel_pro 1.0.0
【发布时间】:2020-08-01 17:36:44
【问题描述】:

有人解决了这个问题 在 owels_ford 中运行“flutter pub get”...
pubspec.yaml 第 21 行第 5 列的错误:一个依赖项可能只有一个来源。

21 │ ┌ sdk: 颤振

22 │ │ carousel_pro: ^0.0.13

23 │ │

24 │ │ # 下面将 Cupertino Icons 字体添加到您的应用程序中。

25 │ │ # 与 CupertinoIcons 类一起用于 iOS 样式图标。

26 │ │ cupertino_icons: ^0.1.2

│└──^

╵ 发布失败(65;╵) 进程以退出代码 65 结束

【问题讨论】:

  • 间距很重要,让carousel_pro在sdk上方的flutter行中:flutter line

标签: flutter flutter-layout flutter-dependencies flutter-animation flutter-web


【解决方案1】:

间距在 pubspec.yaml 文件中非常重要,您只需提供一个选项卡,然后您必须在其中添加包。

dependencies:
  flutter:
    sdk: flutter
  carousel_pro: ^0.0.13 

看看 carousel_pro:^0.0.13 开始在颤动的行中。

【讨论】:

  • 很好用
【解决方案2】:

确保依赖的第二行稍微靠右

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-08-25
    • 2015-05-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-11-08
    相关资源
    最近更新 更多