The root cause should be: when we create the project firstly, the workspace folder has no "build" directory and the relevant build files are not generated yet, so visual code can't find the files, you should build it firstly then these errors will dismiss.
Thanks
![Laughing :lol:](./images/smilies/icon_lol.gif)