为什么我的Flutter Web应用程序无法在运行Webdev服务时运行 [英] Why my flutter web app does not run upon running webdev serve
本文介绍了为什么我的Flutter Web应用程序无法在运行Webdev服务时运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在此处输入图片描述我已经构建了Flutter的网络应用,当我运行webdev serve
我收到此错误消息
enter image description hereI've build my flutter web app and when I run webdev serve
I've got this error message
webdev无法为此项目运行.
在
中找不到名为"pubspec.yaml"的文件 "C:\ Users \ Karrar \ AppData \ Roaming \ Pub \ Cache \ hosted \ pub.dartlang.org \ protobuf-0.13.12".
webdev could not run for this project.
Could not find a file named "pubspec.yaml" in
"C:\Users\Karrar\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\protobuf-0.13.12".
如何解决此问题?
推荐答案
在这里得到回答 https ://github.com/flutter/flutter/issues/32313
您有两个选择:
- 改为使用更长的命令:
flutter packages pub global run webdev serve
或
- 将
protobuf: ^0.13.11
添加到项目依赖项中并运行pub get
,这将获取webdev
缺少的依赖项,然后您可以从项目中删除protobuf
- add
protobuf: ^0.13.11
to your project dependencies and runpub get
, this will fetch missing dependency forwebdev
, then you can removeprotobuf
from your project
这篇关于为什么我的Flutter Web应用程序无法在运行Webdev服务时运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文