首页 > 解决方案 > My camera package depends on quiver 3.0, whereas contacts package depends on quiver 2.0 in flutter

问题描述

I used the following packages-

cupertino_icons: ^1.0.1
  flutter_svg: ^0.19.2+1
  emoji_picker: ^0.1.0
  shared_preferences: ^0.5.12+4
  permission_handler: ^5.1.0+2
  contacts_service: ^0.4.6
  camera: ^0.8.0
  path_provider: ^2.0.1
  path: ^1.8.0

Now it is giving me error that the version of camera plugin needs quiver's version 3, whereas contacts_service needs quiver's version 2. Now what should i do?? If i am changing versions of one of them, other packages start giving errors too.

Here is the error -

Because camera >=0.8.0 depends on quiver ^3.0.0 and contacts_service 0.4.6 depends on quiver ^2.0.0, camera >=0.8.0 is incompatible with contacts_service 0.4.6.
And because no versions of contacts_service match >0.4.6 <0.5.0, camera >=0.8.0 is incompatible with contacts_service ^0.4.6.
So, because flutter_whatsapp depends on both contacts_service ^0.4.6 and camera ^0.8.0, version solving failed.
pub get failed (1; So, because flutter_whatsapp depends on both contacts_service ^0.4.6 and camera ^0.8.0, version solving failed.)

标签: androidflutterdartruntime-error

解决方案


pubspec.yaml尝试在文件中添加覆盖。

dependency_overrides:
  quiver: ^3.0.0

推荐阅读