Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Because every version of flutter_test from sdk depends on... flutter_test from sdk is forbidden, version solving failed

I'm having this issue when I've added http dependency in my flutter project. Can anyone please help me with it?

enter image description here

like image 768
Shoaib Nomani Avatar asked Nov 01 '18 07:11

Shoaib Nomani


3 Answers

If you get the message:

Because every version of flutter_test from sdk depends on...

It means flutter_test depends on a dependency with version lower than you specified in another dependency.

To solve this, open pubspec.yaml, and remove the version number of the problem dependency:

Example:

Change

  archive: ^2.0.13 --> remove this number

To:

  archive: 
like image 129
live-love Avatar answered Oct 21 '22 09:10

live-love


You have provided or trying to use http: ^0.12.0 dependency on implementing API calls in pubspec.yaml file but flutter_test will require http: ^0.11.3+17. That's why it fails. Please replace

dependencies:
  flutter:
    sdk: flutter
  http: ^0.12.0

with

dependencies:
  flutter:
    sdk: flutter
  http: ^0.11.3

Hope it will help you out.

like image 17
Rahul Sharma Avatar answered Oct 21 '22 09:10

Rahul Sharma


In my case, I somehow deleted sdk: flutter:

dependencies:
  flutter:
    sdk: flutter
like image 2
Hai nguyen thanh Avatar answered Oct 21 '22 09:10

Hai nguyen thanh