所以,因为poseapp依赖于sdk中的音频播放器^0.17.0和flutter_driver any,版本解析失败

Posted

技术标签:

【中文标题】所以,因为poseapp依赖于sdk中的音频播放器^0.17.0和flutter_driver any,版本解析失败【英文标题】:So, because postureapp depends on both audioplayers ^0.17.0 and flutter_driver any from sdk, version solving failed 【发布时间】:2021-09-10 13:58:40 【问题描述】:

经过很长时间,我正在尝试运行我曾经成功运行的flutter项目。进行颤振升级后,出现以下依赖错误。我已经从我发现的类似问题中尝试了多种可能的修复方法,但我仍然遇到类似的错误。非常感谢任何帮助。

Because audioplayers >=0.16.2 <0.18.0 depends on uuid ^2.2.2 and no versions of uuid match >2.2.2 <3.0.0, audioplayers >=0.16.2 <0.18.0 requires uuid 2.2.2.

And because uuid 2.2.2 depends on crypto ^2.0.0 and every version of flutter_driver from sdk depends on crypto 3.0.1, audioplayers >=0.16.2 <0.18.0 is incompatible with flutter_driver from sdk.
So, because postureapp depends on both audioplayers ^0.17.0 and flutter_driver any from sdk, version solving failed.

pub get failed (1; So, because postureapp depends on both audioplayers ^0.17.0 and flutter_driver any from sdk, version solving failed.)
exit code 1

我的 pubspec.yaml 文件:

environment:
  sdk: ">=2.2.0 <3.0.0" # ">=2.1.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  cupertino_icons: ^0.1.2
  image_picker: ^0.6.5
  firebase_core: ^1.0.0 #^0.7.0
  firebase_ml_vision: ^0.10.0 #^0.9.3+8
  camera: ^0.8.0 #^0.5.6+1
  smooth_page_indicator: ^0.1.5
  simple_animations: ^2.1.1
  flutter_statusbarcolor: ^0.2.3
  gradient_widgets: ^0.5.1
  time: "^1.3.0"
  audioplayers: ^0.17.0 #^0.15.1 
  path_provider: ^1.6.0 #^1.5.1
  wakelock: ^0.1.4+1
  poller: ^1.1.3
  permission_handler: ^6.1.0 
  mutex: ^1.1.0
dependency_overrides:
  path_provider: ^2.0.0 



dev_dependencies:
  pedantic: ^1.8.0
  e2e: ^0.2.1
  flutter_test:
    sdk: flutter
  flutter_driver:
    sdk: flutter
  test: any
  path: ^1.6.2
  flutter_launcher_icons: ^0.8.1
  flutter_launcher_name: ^0.0.1
  # path_provider: ^0.5.0+1

flutter_icons:
  image_path: "assets/images/logo.png"
  android: true
  ios: true

flutter_launcher_name:
  name: "MyApp"

flutter:
  uses-material-design: true

assets:
  - assets/images/
  - assets/sounds/

【问题讨论】:

从音频播放器和 uuid 中删除版本代码,然后 pub 获取。 你在使用flutter_driver 依赖吗?如果没有,您可以删除它。否则,您可能必须更新您的依赖项(这可能需要迁移您的代码以实现空值安全)。 谢谢你们! 【参考方案1】:

删除了音频播放器的版本号,其他一些库修复了这个问题。

【讨论】:

以上是关于所以,因为poseapp依赖于sdk中的音频播放器^0.17.0和flutter_driver any,版本解析失败的主要内容,如果未能解决你的问题,请参考以下文章

Google Actions sdk 无法从 Firebase 存储中播放 ssml 中的音频

使用 iTunes SDK 播放音频文件

iphone sdk:是不是可以在 iOS 4 的后台播放音频播放列表

音频无法在适用于 iOS 的 Corona SDK 上运行

适用于 Raspberry Pi 的轻量级音频播放和图像显示

您可以播放 iPod 库中的视频吗?