【问题标题】:splash screen in pubspec.yaml throws error A dependency may only have one sourcepubspec.yaml 中的闪屏引发错误依赖项可能只有一个源
【发布时间】:2021-04-04 19:48:04
【问题描述】:

我正在尝试让启动画面正常工作。根据 pub.dev,我按照我的方式将它安装到 pubspec.yaml 中。我看过其他人使用我的方式使用它的视频,它适用于他们。我已经包含了我所拥有的 sn-p。我得到的错误是

我已经在这个论坛上搜索并阅读了解决方案,但我仍然遇到同样的错误。我尝试将最小版本更改为最大版本,我尝试将启动画面移动到 pubspec.yaml 的不同部分

    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: ^1.0.2
  splashscreen: ^1.3.5

dev_dependencies:  
  flutter_test:
    sdk: flutter

我也尝试过启动画面:">=1.2.0

【问题讨论】:

  • 我什么都没试过splashscreen: ^1.3.5,效果很好,你能提供错误代码吗?
  • @FahmiSawalha pub 失败 (65; ╵) 退出代码 65

标签: splash-screen


【解决方案1】:

我最终将它放在“依赖项”下并留在那里。我继续进行项目的其余部分工作,最终在 1 天的启动画面被接受后,我真的什么都没做。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-07-18
    • 2018-09-03
    • 1970-01-01
    • 2020-02-17
    • 2021-11-25
    • 1970-01-01
    • 2010-11-12
    • 2021-02-27
    相关资源
    最近更新 更多