错误:首次运行flutter时未找到pubspec.yaml文件 [英] Error: No pubspec.yaml file found when running flutter for the first time

查看:100
本文介绍了错误:首次运行flutter时未找到pubspec.yaml文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在此处 https://flutter.io/设置窗口/

然后得到

>flutter run
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.

如何解决?

推荐答案

  • 下载 zip文件(假设您已经完成了此操作)
  • 将此拉链解压缩到一个安全的地方,说"E://flutter/"
  • 打开CMD并转到您的工作区文件夹,通常在其中创建项目.
  • 运行命令 flutter create< project_name>
  • cd< project_name>
  • 运行命令 flutter run
    • Download the zip file (Assuming you have already done this)
    • Extract this zip to a safe place say "E://flutter/"
    • Open CMD and goto your workspace folder where to usually create your projects.
    • Run command flutter create <project_name>
    • cd <project_name>
    • Run command flutter run
    • 或者,您始终可以使用良好的IDE,例如 Intellij 或AndroidStudio将自动执行类似@Rechard所说的配置.

      Alternatively, you can always use a good IDE like Intellij or Android Studio which will automate such configs like @Rechard said.

      这篇关于错误:首次运行flutter时未找到pubspec.yaml文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆