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

Shoaib Nomani picture Shoaib Nomani · Nov 1, 2018 · Viewed 14.4k times · Source

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

Answer

Rahul Sharma picture Rahul Sharma · Nov 12, 2018

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.