[英]How do I fix "Error: No pubspec.yaml file found." in flutter w/ Android studio?
I've been looking and googling for a while and couldn't find a fitting answer, I've tried different commands through the terminal, as was suggested in some forums but nothing really helped.我一直在寻找和谷歌搜索一段时间,但找不到合适的答案,我已经通过终端尝试了不同的命令,正如某些论坛中所建议的那样,但没有任何帮助。 I have this issue for some reason only with a specific project, other flutter projects that I have are running with no issues at all由于某种原因,我只在特定项目中遇到此问题,我拥有的其他 flutter 项目正在运行,完全没有问题
For Example, I've tried to run this in the terminal and this is what I got:例如,我试图在终端中运行它,这就是我得到的:
Error: No pubspec.yaml file found.
This command should be run from the root of your Flutter project
Any help, suggestions, and recommendations would be much appreciated任何帮助、建议和建议将不胜感激
This problem is due to the fact that you are running the flutter run
command from a different directory.此问题是由于您正在从不同的目录运行flutter run
命令。 Usually, when you try this command, you are in the parent directory instead of the root directory.通常,当您尝试此命令时,您是在父目录而不是根目录中。
Try running the flutter run
command from the project directory using the cd YOUR_ROOT_DIRECTORY
command you can enter to that directory.尝试使用cd YOUR_ROOT_DIRECTORY
命令从项目目录运行flutter run
命令,您可以进入该目录。
decided to reinstall android studio and make sure that everything is correct with the PATH of the SDK, and reinstalled the SDK tools.决定重新安装 android studio 并确保 SDK 的 PATH 一切正确,并重新安装 SDK 工具。 pretty much worked for some reason由于某种原因几乎工作
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.