What are common causes for IntelliJ IDEA not being able to resolve built-in JVM types and methods? For example, when I mouse over String
the tooltip says "Cannot resolve symbol 'String'". It's as if IntelliJ has doesn't know where the JVM is.
By the way, I am running OS X 10.6.6. Everything was working fine until I ran the system update this morning.
This question is related to
intellij-idea
Most likely JDK configuration is not valid, try to remove and add the JDK again as I've described in the related question here.
I was facing the same problem when import projects into IntelliJ.
for in my case first, check SDK details and check you have configured JDK correctly or not.
Go to File-> Project Structure-> platform Settings-> SDKs
Check your JDK is correct or not.
Next, I Removed project from IntelliJ and delete all IntelliJ and IDE related files and folder from the project folder (.idea, .settings, .classpath, dependency-reduced-pom). Also, delete the target folder and re-import the project.
The above solution worked in my case.
For me, IntelliJ could autocomplete packages, but never seemed to admit there were actual classes at any level of the hierarchy. Neither re-choosing the SDK nor re-creating the project seemed to fix it.
What did fix it was to delete the per-user IDEA directory ( in my case ~/.IntelliJIdea2017.1/
) which meant losing all my other customizations... But at least it made the issue go away.
First check if you have configured JDK correctly:
Secondly check if you have provided in path in Library's section
This should fix the problem
Source: Stackoverflow.com