close

Flutter 2.0 upgrade, pub get failed with nonsense dependency behavior

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:

Here is my flutter Doctor output.

How To Solve Flutter 2.0 upgrade, pub get failed with nonsense dependency behavior ?

Question: How To Solve Flutter 2.0 upgrade, pub get failed with nonsense dependency behavior ?
Answer: when we update our flutter version we have to override our package. So just add dependency_overrides below your dev_dependencies and dont forgot to mention your package.

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 :

  1. Open pubspec.yaml file.
  2. Just add dependency_overrides below dev_dependencies.
  3. run pub get.
  4. That’s It.

Here Is Sample Code for pubspec.yaml

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):

Solution 3

Just add dependency_overrides to resolve this conflicts :

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

Milan Dhameliya is an Information Technology Engineer. By profession, he is a Full Stack developer with knowledge of multiple back-end platforms (e.g., PHP, Node.js, Python) and frontend Flutter frameworks.

Leave a Comment