IDEA suddenly stopped detecting the JDK
已回答
I've been working on Java projects on IDEA for a while. Yesterday it suddenly stopped detecting the installed JDK.
The errors show up like so: https://i.imgur.com/UEXb1fM.jpg
As you can see, the project settings are set properly and I have not changed anything at all: https://i.imgur.com/elTH9QT.jpg
As a final comment, I re-installed Netbeans to test if this was a problem with IDEA or the actual JDK (even though there were no changes to it) and it works fine there.
请先登录再写评论。
Remove JDK configuration in IntelliJ IDEA and add it again.
Also try File | Invalidate Caches | Invalidate and Restart.
The 'Invalidate Caches' option worked. Thanks.