[英]How to solve 'could not find package integration_test in the Flutter SDK' error
I have an app, it is very simple and I keep getting this error:我有一个应用程序,它非常简单,但我一直收到此错误:
pub get failed (server unavailable) -- attempting retry 1 in 1 second... Because bascis depends on integration_test any from sdk which doesn't exist (could not find package integration_test in the Flutter SDK), version solving failed.
pub get failed (server unavailable) -- attempted retry 1 in 1 second... 因为bascis depends on integration_test any from sdk which doesn't exist (could not find package integration_test in the Flutter SDK), version solving failed.
I have tried我试过了
Pup upgrade, Pub get.小狗升级,酒吧得到。
How can I get rid of this error?我怎样才能摆脱这个错误?
I had the same error after changing my channel from master to stable.将频道从 master 更改为 stable 后,我遇到了同样的错误。 I was able to fix it by removing (or commenting out) the following library from pubspec.yaml
我能够通过从 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.我在尝试设置 flutter web 项目时遇到了这种情况,但没有在我的 PC 上启用 flutter web。 I enabled flutter for web and everything was okay.
我为 web 启用了 flutter ,一切正常。
For me had to comment out sdk
part like so:对我来说,必须像这样注释掉
sdk
部分:
dev_dependencies:
integration_test:
# sdk: flutter
It is likely due to your.network problem.这可能是由于您的网络问题。 Because the output says
(server unavailable)
.因为 output 说
(server unavailable)
。
Ways to debug this:调试方法:
curl https://google.com
to see whether your command line can connect to.network.curl https://google.com
看看你的命令行能不能连上.network。curl https://flutter.dev
(or, try to curl the actual url your pub get
is trying to access.curl https://flutter.dev
(或者,尝试 curl 实际的 url 你的pub get
正在尝试访问。 This may due to, for example, your.network is broken.这可能是由于,例如,您的网络已损坏。 Or because you have a broken VPN, broken proxy, etc.
或者因为您的 VPN 损坏、代理损坏等。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.