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

后端 未结 23 1919
南方客
南方客 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

    For me the culprit was OneDrive. I had to reinstall Windows 10 and when I did, it offered to setup OneDrive for me automatically. I thought - great, one less thing... Then later I realized that it had set itself up with the Files On Demand option set to true. Microsoft never ceases to elicit a facepalm from me with the things they think are great ideas. Just to verify that this was the problem, I copied the entire folder to a temporary location on my hard drive that wasn't synced to OneDrive and it ran fine.

    If something has been corrupted in the process of trying to build and run without all the files accessible, hopefully you have a recent commit from github (prior to putting the project on OneDrive) that you can clone. This is assuming your problem has the same cause as mine.

提交回复
热议问题