close
flutter packages get failed depends on flutter_test any from sdk which requires SDK version

[Solved] flutter packages get failed depends on flutter_test any from sdk which requires SDK version <2.0.0, version solving failed

Hello Guys How are you all? Hope You all are fine. When I was trying to run my flutter app and suddenly I get the following error in my stack track. flutter packages get failed depends on flutter_test any from sdk which requires SDK version <2.0.0, version solving failed in a flutter. 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 packages get failed depends on flutter_test any from sdk which requires SDK version <2.0.0, version solving failed Error Occurs ?

I have created a new project and I add one package in my pubspec.yaml file. But when I run pub get. It gives me the Following error.

Because second depends on flutter_test any from sdk which requires SDK version <2.0.0, version solving failed.
pub get failed (1)
exit code 1

How to Solve flutter packages get failed depends on flutter_test any from SDK which requires SDK version <2.0.0, version solving failed Error?

  1. How to Solve flutter packages get failed depends on flutter_test any from sdk which requires SDK version <2.0.0, version solving failed Error?

    To Solve flutter packages get failed depends on flutter_test any from SDK which requires SDK version <2.0.0, version solving failed Just run flutter channel dev and flutter upgrade in your terminal will solve your error.

  2. flutter packages get failed depends on flutter_test any from sdk which requires SDK version <2.0.0, version solving faile

    To Solve flutter packages get failed depends on flutter_test any from SDK which requires SDK version <2.0.0, version solving failed Just run flutter channel dev and flutter upgrade in your terminal will solve your error.

Solution 1

Just run flutter channel dev and flutter upgrade in your terminal will solve your error.

flutter channel dev
flutter upgrade

Solution 2

You just have to update SDK by following command. First of all run flutter channel dev.

flutter channel dev

then just upgrade flutter sdk by this command.

flutter upgrade

Solution 3

Just upgrade the package version in pubspec.yaml to the latest version fixed my issue.

Summery

So, It’s All About This error. I hope this tutorial helps you to Solve your error. Please Comment Below if You stucks anywhere with my code. And please comment below on which solution worked for you. Thank You.

Also Check Out Below Tutorials


Posted

in

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *