【问题标题】:Error in terminal while running flutter pub get: Response:运行flutter pub get时终端出错:响应:
【发布时间】:2020-01-05 15:02:46
【问题描述】:

我是 Flutter 的新手,所以,我试过这个 Flutter force higher package dependency version

我的代码是

dependencies:
  intl: ^0.15.0

我把它换成了

dependency_overrides:
   intl: ^0.16.0

但我仍然收到此错误

        $ flutter pub get
        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.

【问题讨论】:

    标签: flutter flutter-dependencies


    【解决方案1】:

    这不是 pubspec 问题。您只是从错误的目录执行命令。

    cd 进入你的颤振项目文件所在的目录。这将是包含其他文件夹(如 build、android、ios、lib 以及 pubspec.yaml 文件)的文件夹。从那里运行flutter pub get

    【讨论】:

      【解决方案2】:

      转到项目的根目录,其中存在 lib 和其他目录。然后运行命令。最好是使用代码编辑器的终端,因为路径与那里的项目根目录相同。

      【讨论】:

        猜你喜欢
        • 2020-03-24
        • 2020-11-13
        • 2019-10-19
        • 1970-01-01
        • 2022-07-11
        • 2021-06-09
        • 2018-08-09
        • 2022-06-11
        • 2014-08-04
        相关资源
        最近更新 更多