2

After updating to 2019.1.3, IntelliJ (Community Edition) stopped recognizing any of the built-in java classes on my development machine. I get the following error:

Can't resolve Symbol String

Can't resolve Symbol String

I first thought the JDK was not configured properly, but it doesn't look like so:

enter image description here

I can see all the java base classes, including java.lang.String, under the "External dependencies" panel in IntelliJ :

enter image description here

I tried to reinstall the JDK, without any success:

sudo apt-get --purge remove openjdk-11-jdk
sudo apt-get install openjdk-11-jdk

I also invalidated caches and restarted IntelliJ, also unsuccessfully.

Compilation from the command line works fine.

8
  • Which IntelliJ version you are using? Jun 9, 2019 at 20:02
  • I am using IntelliJ IDEA 2019.1.3 (Community Edition) Build #IC-191.7479.19, built on May 28, 2019 JRE: 1.8.0_202-release-1483-b58 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Linux 4.15.0-51-generic I will add this information to the question.
    – lovasoa
    Jun 9, 2019 at 20:05
  • It seems this pose here has the same issue askubuntu.com/questions/1101033/… Jun 9, 2019 at 20:10
  • Unfortunately, it looks like no one found a solution to the question you link. One answer is about someone who did not use the right path to the jdk, another is the OP saying he switched to oracle's JDK.
    – lovasoa
    Jun 9, 2019 at 20:17
  • Not sure if related, would be odd if 11 as the same issue: stackoverflow.com/questions/47296429/…
    – Taji
    Jun 9, 2019 at 20:50

2 Answers 2

3

I had the same problem with Ubuntu 19.10 and could solved as follows:

Intellij IDEA

File -> Project Structure -> SDK ->

JDK home path: /usr/lib/jvm/default-java

Hope it will help someone.

1

I updated my plugins within IntelliJ which caused IntelliJ to reindex again.

Apparently, that did the trick and it is working fine now for me.

1
  • 2
    Note that there is also an "invalidate caches and restart" action in the File menu, that sometimes achieves wonders.
    – GhostCat
    Jun 18, 2019 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.