Hello Guys How are you all? Hope You all are fine. When I try to upgrade my flutter app to flutter 2.0. I am Facing an Error. Flutter 2.0 upgrade, pub get failed with nonsense dependency behavior. So today Here I come with all possible solutions for this error.
We are providing you all possible solutions to solve this error. let’s start this article without wasting your time.
How Flutter 2.0 upgrade, pub get failed with nonsense dependency behavior Occurs ?
I Upgrade My flutter project to flutter latest version 2.0. When I upgrade to flutter 2 and I got this error:
Because geoflutterfire 2.2.1 depends on rxdart ^0.24.1 and no versions of geoflutterfire match >2.2.1 <3.0.0, geoflutterfire ^2.2.1 requires rxdart ^0.24.1.
So, because sample_app depends on both rxdart ^0.26.0 and geoflutterfire ^2.2.1, version solving failed.
pub get failed (1; So, because sample_app depends on both rxdart ^0.26.0 and geoflutterfire ^2.2.1, version solving failed.)
Here is my flutter Doctor output.
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.0.0, on macOS 11.1 20C69 darwin-x64, locale en-IL)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] IntelliJ IDEA Community Edition (version 2019.1)
[✓] Connected device (2 available)
How To Solve Flutter 2.0 upgrade, pub get failed with nonsense dependency behavior ?
- How To Solve Flutter 2.0 upgrade, pub get failed with nonsense dependency behavior?
To Solve Flutter 2.0 upgrade, pub get failed with nonsense dependency behavior When we update our flutter version we have to override our package. So just add dependency_overrides below your dev_dependencies and don’t forget to mention your package. You can try to add dependency_overrides to resolve these conflicts. Open pubspec.yaml file. Just add dependency_overrides below dev_dependencies. run pub get. That’s It.
- Flutter 2.0 upgrade, pub get failed with nonsense dependency behavior
To Solve Flutter 2.0 upgrade, pub get failed with nonsense dependency behavior When we update our flutter version we have to override our package. So just add dependency_overrides below your dev_dependencies and don’t forget to mention your package. You can try to add dependency_overrides to resolve these conflicts. Open pubspec.yaml file. Just add dependency_overrides below dev_dependencies. run pub get. That’s It.
Solution 1
When we update our flutter version we have to override our package. So just add dependency_overrides below your dev_dependencies and don’t forget to mention your package. You can try to add dependency_overrides to resolve these conflicts :
- Open pubspec.yaml file.
- Just add dependency_overrides below dev_dependencies.
- run pub get.
- That’s It.
Here Is Sample Code for pubspec.yaml
dependency_overrides:
plugin_platform_interface: '>=2.0.0'
intl: '>=0.17.0'
rxdart: '>=0.26.0'
This solution worked for me. Comment below if work for you also.
Solution 2
My suggestion is for a few week don’t update your flutter version
To downgrade your flutter (Master channel):
flutter downgrade 1.22.6
Solution 3
Just add dependency_overrides to resolve this conflicts :
dependency_overrides:
intl: "<0.17.0"
Summery
So it’s all About All possible solutions. Hope this above all solution helped you a lot. Comment below Your thoughts and your queries. Comment Below on your suggestion.
Check Out Below Article
- How to make a blur Background Image effect in Flutter using BackdropFilter.
- How to add Border Radius to Container in Flutter ?
- Also Read How To Use Date Picker in Flutter
- How to Create TabBar in Flutter Complete Guide To Make TabBar
- How to Create Popup in Flutter Popup Menu Example
Leave a Reply