How do I fix “No pubspec.yaml file found” in flutter?

后端 未结 23 1978
南方客
南方客 2021-02-07 02:46

I am using Windows 10 with VS Code, although I also tested it on PowerShell, and both produced the same result:

After creating a new flutter program, before editing anyt

23条回答
  •  佛祖请我去吃肉
    2021-02-07 03:08

    Got a similar error:

    The directory ../ does not contain a pubspec.
    

    This is because I was referring to a folder that did not have a pubspec.yaml file.

    Solution:

    Change from:

      file_picker:
        path: ../
    

    To

      file_picker:
        path: ./
    

提交回复
热议问题