Dart: Suddenly have Error "Unable to run pub"

时间:2015-08-14 22:53:35

标签: dart dart-pub

I can no longer build my application from the Tools menu "Pub Build - debug" The window alert is:

Unable to run pub
Please select a pubspec.yaml file before running pub.

How does one 'select' a pubspec.yaml file? I have it highlighted in the editor so that's not it. I've restarted the editor and when that didn't work I rebooted. Other pub functions work.

If I open the pubspec.yaml file and click on "run build debug" in the editor it does build. I've not added any imports recently.

Is there a configuration file that might be corrupted?

1 个答案:

答案 0 :(得分:0)

在项目视图中选择pubspec.yaml,然后使用Tools > Pub build或使用项目视图中pubspec.yaml文件的上下文菜单。