0

Because flutter_bloc: 0.21.0 depends on provider: ^3.0.0 and no versions of flutter_bloc match: >0.21.0 <0.22.0, flutter_bloc: ^0.21.0 requires provider: ^3.0.0. So, because it tells_me that it depends on both provider: ^4.1.2 and flutter_bloc: ^0.21.0, version solving failed.

pub get failed (1; So, because tellz_me depends on both provider ^4.1.2 and flutter_bloc ^0.21.0, version solving failed.)
Alok
  • 8,452
  • 13
  • 55
  • 93
Tarun Mehta
  • 21
  • 1
  • 8
  • can you share the pubspec.yaml file packages – Sanjeev Sangral Jun 09 '20 at 05:05
  • version: 1.0.0+1 environment: sdk: ">=2.1.0 <3.0.0" 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: ^0.1.2 # barcode_scan: ^1.0.0 qr_mobile_vision: http: ^0.12.0+2 shared_preferences: ^0.4.1 torch: ^0.1.1 loading: ^1.0.1 rflutter_alert: ^1.0.3 load: connectivity: ^0.4.5+6 flutter_cupertino_localizations: ^1.0.1 super_tooltip: ^0.9.0 percent_indicator: ^2.1.1 flutter_slidable: ^0.5.4 – Tarun Mehta Jun 09 '20 at 05:19
  • provider: ^4.1.2 image_picker: ^0.6.2+3 flutter_tags: "^0.4.5" flutter_staggered_grid_view: "^0.3.0" speech_recognition: "^0.3.0" device_info: ^0.4.1+3 # flutter_multimedia_picker: ^1.0.3 flutter_picker: http_parser: media_picker_builder: permission_handler: path: path_provider: thumbnails: photo: oktoast: page_view_indicators: ^1.3.1 flutter_spinkit: "^4.1.1" fluttertoast: esys_flutter_share: ^1.0.2 toast: ^0.1.5 stories: ^0.1.1 firebase_messaging: ^6.0.9 flutter_visualizers: ^0.0.1 – Tarun Mehta Jun 09 '20 at 05:19
  • photo_view: ^0.9.1 image_collage_widget: ^1.0.0 bubble: ^1.1.9+1 file_picker: ^1.4.3+2 video_thumbnail: ^0.2.0 flutter_sound: ^2.0.3 video_player: ^0.10.6 audio_recorder: # audio_picker: ^1.0.0 emoji_picker: open_file: place_picker: ^0.9.12 flutter_parsed_text: ^1.1.0 transparent_image: ^1.0.0 uuid: ^2.0.1 intl: ^0.16.1 undo: ^1.0.1+3 cached_network_image: firebase_auth: google_sign_in: # cloud_firestore: ^0.12.9+5 cloud_firestore: ^0.12.10+2 firebase_storage: ^3.0.6 url_launcher: ^5.4.5 file: ^5.0.4 – Tarun Mehta Jun 09 '20 at 05:20
  • multi_image_picker: ^4.6.6+rc.1 flutter_absolute_path: ^1.0.6 # flutter_multiple_image_picker: ^0.0.1 geolocator: ^5.1.4+2 google_map_location_picker: ^3.3.2 keyboard_visibility: maps_launcher: ^1.2.0 autocomplete_textfield: ^1.7.3 selectable_autolink_text: ^1.3.2 flutter_linkify: ^3.1.3 flutter_statusbarcolor: flutter_uploader: firebase_crashlytics: image_cropper: flutter_bloc: ^0.21.0 – Tarun Mehta Jun 09 '20 at 05:20
  • Please check the upper 4 comments Thanks in advance – Tarun Mehta Jun 09 '20 at 05:20
  • update your flutter_bloc: ^4.0.0 and all the packages as per latest version – Sanjeev Sangral Jun 09 '20 at 05:54
  • Then i get this :- Because tellz_me depends on image_collage_widget ^1.0.0 which depends on flutter_bloc ^0.21.0, flutter_bloc ^0.21.0 is required. So, because tellz_me depends on flutter_bloc ^4.0.0, version solving failed. pub upgrade failed (1; So, because tellz_me depends on flutter_bloc ^4.0.0, version solving failed.) – Tarun Mehta Jun 09 '20 at 05:57
  • what package is that ** tellz_me** ? can you share the link? – Sanjeev Sangral Jun 09 '20 at 18:47
  • Its just a project name – Tarun Mehta Jun 10 '20 at 06:26
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/215636/discussion-between-sanjeev-sangral-and-tarun-mehta). – Sanjeev Sangral Jun 10 '20 at 06:31

2 Answers2

0

you need to use dependency override.

this code is from my project, so path provider was the problem, you need to find the package that makes. the conflict and put it inside the dependency_overrides this will fix your problem.

dependencies:
  flutter:
    sdk: flutter

  cupertino_icons: ^1.0.0
  file_picker: ^3.0.0
  hive: ^2.0.0
  hive_flutter: ^1.0.0

dependency_overrides:
  path_provider: 2.0.1
SinaMN75
  • 6,742
  • 5
  • 28
  • 56
0

See this: https://stackoverflow.com/a/67517680/13500457

And how to update the dependencies automatically:

https://stackoverflow.com/a/66759292/13500457

I would suggest you to remove all dependencies and run pub get and add the dependencies using the command method, not by copy pasting. See this or mentioned above:

https://stackoverflow.com/a/67517680/13500457

I hope it helps, happy coding!

Apoorv Pandey
  • 2,118
  • 2
  • 11
  • 13