运行颤振酒吧时终端出错:响应:



我是颤振的新手,所以,我尝试了这个颤振强制更高的包依赖版本,

我的代码是

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.

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

CD 到您的 Flutter 项目文件所在的目录中。这将是包含其他文件夹的文件夹,如build,android,ios,lib以及pubspec.yaml文件。从那里运行flutter pub get

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

最新更新