How to solve 'could not find package integration_test in the Flutter SDK' error
It is likely due to your network problem. Because the output says (server unavailable)
.
Ways to debug this:
- Try
curl https://google.com
to see whether your command line can connect to network. - Also try, for example,
curl https://flutter.dev
(or, try to curl the actual url yourpub get
is trying to access.
This may due to, for example, your network is broken. Or because you have a broken VPN, broken proxy, etc.
For me had to comment out sdk
part like so:
dev_dependencies:
integration_test:
# sdk: flutter
I had the same error after changing my channel from master to stable. I was able to fix it by removing (or commenting out) the following library from pubspec.yaml
dev_dependencies:
# integration_test:
# sdk: flutter
I experienced this when I was trying to setup a flutter web project without enabling flutter web on my PC. I enabled flutter for web and everything was okay.