本文主要是介绍Error: No pubspec.yaml file found.的解决办法,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
在执行 flutter clean 指令时提示异常,说找不到pubspec.yaml文件,日志如下:
D:\setup\flutterSDK\flutter>flutter clean
Error: No pubspec.yaml file found.
This command should be run from the root of your Flutter project.
Do not run this command from the root of your git clone of Flutter.D:\setup\flutterSDK\flutter>
原因已经提示的很明确了,主要的原因就是执行命令的路径不对,执行命令时需要保证路径在项目的根目录,即pubspec.yaml文件所在的路径,或者可以新打开一个terminal窗口,如下:
这篇关于Error: No pubspec.yaml file found.的解决办法的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!