skip to Main Content

When i’m typing to do pub get in flutter i’m getting some errors

`**Resolving dependencies...
Because every version of month_year_picker depends on flutter_localizations from sdk which depends on intl 0.18.1, every version of month_year_picker requires intl 0.18.1.
So, because assingment depends on both intl ^0.17.0 and month_year_picker ^0.2.0+3, version solving failed.**`
**Because month_year_picker <0.3.0+1 depends on intl ^0.17.0 and assingment depends on intl ^0.18.1, month_year_picker <0.3.0+1 is forbidden.
So, because assingment depends on month_year_picker ^0.2.0+3, version solving failed.**

I have tried degrading and upgrading intl package but still it shows errors and i’m not able to use pub get in android Studio

3

Answers


  1. Remove one of the conflicted packages then pub get, and install that package using command : flutter pub add <packagename>

    Login or Signup to reply.
    1. Add this to your pubspec.
    dependencies:
      assingment:
        dependency_overrides:
          month_year_picker: ^0.3.0+1
    
    1. Run flutter pub get
    Login or Signup to reply.
  2. You can use any instead of a specific package version, however, it is not recommended especially when you want to release the app.

    dependencies:
      ...
      some_dependency: any
      ...
    

    In addition, Version Lens is a useful extension in this case.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search