Cannot resolve any import


When starting with a skeleton Java project in IDEA 2016.1, on every import (such as java.util.List) the editor complaines that the class cannot be resolved. However the command completion and go-to-declaration will find it. Also the code compiles fine. It seems to be an issue concerning the editor only, but it makes it basically unusable.

I tried the obvious stuff:

  • Check that any/correct JDK is selected for project
  • Invalidate cache
  • Re-install IDE and JDK

But without luck.

The problem seems to be similar to the one reported here: but in my case the problem is with any import.

This is the first time I am using IDEA for Java (only Python so far), so any hint is much appreciated.


Comment actions Permalink

Try to remove IDE folders to start with all the defaults ( Configure JDK, make a new project and see if it helps.

Comment actions Permalink

Thanks for the quick answer, but unfortunately still no luck.

I am just creating a plain Java object from scratch from within Intellij, and it would still not recognize the standard library.

However when uninstalling and going back to version 15.0.5, it works. So I guess I will just use the old version and check if the problem is fixed in the next 2016 release.

Comment actions Permalink

You can try 2016.1.2 EAP: .

However, it's not something that can be easily reproduced, otherwise we'd be flooded with similar reports.


Please sign in to leave a comment.