Terminal 错误:找不到pubspec.yaml文件。在MAC中

Terminal 错误:找不到pubspec.yaml文件。在MAC中,terminal,flutter,Terminal,Flutter,我是个新手。在MAC上安装后,在终端上运行“颤振运行”时,我得到的错误如下: 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. 任何人都可以帮助我修复此错误???假设您没有创建项目:打开Android Stud

我是个新手。在MAC上安装后,在终端上运行“颤振运行”时,我得到的错误如下:

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.

任何人都可以帮助我修复此错误???

假设您没有创建项目:打开Android Studio或您的IDE并。还要确保正确设置了环境


您试图运行的此命令
flatter run
用于在当前目录下编译项目,然后在模拟器或设备上运行它。

您是从flatter项目的根目录运行的吗?此目录应包含一个
pubspec.yaml
。你有没有检查文件是否存在?