What I have:
- Intellij IDEA 2019.3, bundled JDK 11.0.3
- A Maven project with project JDK: the bundled JDK
My problem:
For anyjava.
imports I get the errorCannot resolve symbol ...
but I can still compile correctly.
I’m totally aware that a lot of people already discussed this problem, and of course I have tried all of it: - Use the dialog ‘Setup JDK’ a thousand times to set the project JDK again
- Validate that all modules and the project use the correct language level 11
- Invalidate Cache / Restart
- Delete the file
<project name>.iml
- Delete the
.idea
directory - Reimport the whole maven project
Advertisement
Answer
The problem is connected with the bundled JDK: I have installed manually another JDK 11.0.4, set it as project JDK and now it works