Home > Back-end >  Flutter dependency conflict
Flutter dependency conflict

Time:10-02

Please I am having a dependency conflict on flutte, my problem is it is complaining about packages that I did not specify in the pubspec.yml.

I have tried to do dependency_overrides: but it did not solve my issue, I also tried to remove version numbers to let flutter decide on the version number to use but still did not solve my issue.

I have tried many platforms and didn't find any solution.

Please help.

Here is my pubspec.yml file

name: airstyl


publish_to: "none" # Remove this line if you wish to publish to pub.dev



https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html

version: 1.0.4 21

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  cloud_firestore:
  firebase_core:
  firebase_auth:
  firebase_database:
  ars_progress_dialog:  #For ios
  progress_dialog:
  intro_screen_onboarding_flutter:
  flutter_svg:
  rate_my_app:
  flutter_markdown:
  animations:
  provider:
  flutter_places_autocomplete: 
  intl:
  firebase_storage:
  image_picker:
  image_cropper:
  file_utils:
  flutter_spinkit:
  cached_network_image:
  like_button:
  syncfusion_flutter_calendar:
  font_awesome_flutter:
  flutter_datetime_picker:
  checkbox_formfield:
  flutter_dropdown:
  multiselect_formfield:
  multi_select_flutter:
  google_maps_webservice:
  flutter_google_places:
  flutter_session:
  fluttertoast:
  flutter_search_bar:
  sweetalert:
  shared_preferences:
  search_page:
  badges:
  sms_autofill:
  flutter_local_notifications:
  timezone:
  pinput:
  google_place:
  animated_list_view_scroll:
  jdate:
  flutter_native_timezone:
  firebase_analytics:
  firebase_crashlytics:
  flutter_email_sender:
  share:
  firebase_dynamic_links:
  group_radio_button:
  package_info:
  flutter_typeahead:
  http:
  connectivity:
  geocoder:
  shimmer:
  upgrader:
  flutter_form_bloc:
  flutter_bloc:
  
  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.0

dev_dependencies:
  flutter_test:
    sdk: flutter
    
   fonts:
    - family: Roboto
      fonts:
        - asset: fonts/Roboto/Roboto-Black.ttf
        - asset: fonts/Roboto/Roboto-BlackItalic.ttf
        - asset: fonts/Roboto/Roboto-Bold.ttf
        - asset: fonts/Roboto/Roboto-BoldItalic.ttf
        - asset: fonts/Roboto/Roboto-Italic.ttf
        - asset: fonts/Roboto/Roboto-Light.ttf
        - asset: fonts/Roboto/Roboto-LightItalic.ttf
        - asset: fonts/Roboto/Roboto-Medium.ttf
        - asset: fonts/Roboto/Roboto-MediumItalic.ttf
        - asset: fonts/Roboto/Roboto-Regular.ttf
        - asset: fonts/Roboto/Roboto-Thin.ttf
        - asset: fonts/Roboto/Roboto-ThinItalic.ttf
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages

The error I am getting

[stylist] flutter pub get
Running "flutter pub get" in stylist...                         
Because mockito >=4.1.1 1 <4.1.2 depends on test_api >=0.2.1 <0.4.0 and mockito >=4.0.0 <=4.1.1 depends on test_api ^0.2.1, mockito >=4.0.0 <4.1.2 requires test_api >=0.2.1 <0.4.0.
And because every version of flutter_places_autocomplete depends on mockito ^4.1.1, every version of flutter_places_autocomplete requires test_api >=0.2.1 <0.4.0 or mockito ^4.1.2.
And because mockito >=4.1.2 <=5.0.0-nullsafety.7 depends on test_api ^0.2.19-nullsafety and every version of flutter_test from sdk depends on test_api 0.4.3, flutter_test from sdk is incompatible with flutter_places_autocomplete.
So, because airstyl depends on both flutter_places_autocomplete any and flutter_test any from sdk, version solving failed.
pub get failed (1; So, because airstyl depends on both flutter_places_autocomplete any and flutter_test any from sdk, version solving failed.)
exit code 1

When I remove flutter_places_autocomplete I get this error. NB E:\ is my local drive, not network drive.

[stylist] flutter pub get
Running "flutter pub get" in stylist...                         
Cannot create link, path = 'E:\flutter_windows_2.5.1-stable\flutter\.pub-cache\_temp\dira20812b9\ios\Classes\FLTPackageInfoPlugin.m' (OS Error: A required privilege is not held by the client.
, errno = 1314)
pub get failed (66; , errno = 1314))
exit code 66

CodePudding user response:

You need to specify the version of dependencies. You have not specified any version of all your dependencies. First specify the version of your dependency andiron pub get. After Dependency error on specific packages. change their version according to the error

  • Related