Project compilation error

I’ve tried to compile my project but I get the error:

(filename.java) is a non project file, only syntax errors are reported

I’ve tried cleaning java language server workspace, but it still doesn’t work.

You probably did not open the project root.

I’m not really sure what opening the project root means. Could you please elaborate on that?

You should open VSCode in the directory of the cloned project.
In the file view on the left, you should see the src folder and files like .classpath, .gitignore, .project.