How to fix IntelliJ cannot resolve symbol
Thursday 08, October 2015 | Post link
Ever since copying a Gradle project from one computer to another I have been getting 'cannot resolve symbol String' and similar messages in IntelliJ. Listed below are steps which *may* fix the problem:
-
Invalidate and refresh the IntelliJ's caches
File Menu -> Invalidate Caches / Restart -
Project SDK selection
Check project settings from File Menu -> Project Structure
Ensure an SDK is selected for the Project SDK. Ifis selected, click the 'New' button, select JDK and then select the correct path to the JDK e.g. /opt/java/jdk1.8 or c:\Java\Jdk1.8
- Corrupt JDK
There may be a problem with your JDK installation, re-install JDK -
Re-import the project
Close the project if it is open in IntelliJ
Delete the .idea folder in the project source code folder.
Start IntelliJ and Import the project.
Categories:
Java (10)
Tags:
Intelli J(1)
Comments