Note: step (b) is needed only if your project is using Gradle (i.e., if there is a build.gradle
file in the project root folder).
(a) Confirm the project JDK is set to the one you are supposed to use for the project, as explained here.
(b) Confirm the correct JVM is used for Gradle, as given in the panel below: