How to avoid VS Code warning: “[myfile].java is a non-project file, only syntax errors are reported”

后端 未结 4 2684
渐次进展
渐次进展 2021-01-05 17:37

I am running a build task in a java project in Visual Studio Code. The warning in the "PROBLEMS" tab:

[myfile].java is a non-project file, only

4条回答
  •  庸人自扰
    2021-01-05 18:11

    Try cleaning the Java language server workspace:

    1. CMD+SHIFT+P (CTRL+SHIFT+P ON WINDOWS) to show command palette
    2. Choose "Java: Clean the Java language server workspace"
    3. Restart and Delete

    Just worked for me.

提交回复
热议问题