'How can i solve this issue of dependencies in flutter android studio?

Im new to flutter. please advise how can i solve this issue? I tried to update all dependencies but i got error

This is the error i get when running flutter pub add flutter_plugin_android_lifecycle

Because tflite_flutter_helper >=0.3.1 depends on camera ^0.9.4+5 which depends on flutter_plugin_android_lifecycle ^2.0.2, tflite_flutter_helper >=0.3.1 requires f lutter_plugin_android_lifecycle ^2.0.2. And because image_picker >=0.6.3 <0.7.0-nullsafety depends on flutter_plugin_android_lifecycle ^1.0.2, tflite_flutter_helper >=0.3.1 is incompatible with image_pic ker >=0.6.3 <0.7.0-nullsafety. So, because yyyy depends on both image_picker ^0.6.7+22 and tflite_flutter_helper ^0.3.1, version solving failed. pub finished with exit code 65

my pubspec.yaml file

cupertino_icons: ^1.0.4
  tflite_flutter: ^0.9.0
  tflite_flutter_helper: ^0.3.1
  image_picker: ^0.6.7+14

EDIT: [1]: https://i.stack.imgur.com/Ql1p5.png



Solution 1:[1]

The issues is probably as a result of having multiples of same dependencies with conflicting versions across various packages.

Checkout this official flutter documentation on dependency versioning and resolution. Here

You may need to share your pubspec.yaml for more details, but you would want to try using an older version of tflite_flutter_helper

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Tim