Intellij IDEA cannot resolve any import statement

Answered

Hi there,

 

I am struggling recently with very strange issue. Suddenly, my intellij IDEA stopped resolving all java import statements.

 

The only solution that worked so far for me was to uninstall intellij IDEA and install it again. Although, when I import one of my projects upon ~4 hours it cannot resolve any import statement again. This happes only for that one project. It is Eclipse RCP based.

 

Unfortunatelly, I cannot share with you the source codes of that project.

 

What I have already tried is the following:

  1. Remove .idea folder
  2. Remove all *.iml files
  3. Invalidate and restart

None of this works for me. When I create project from the scratch it also tells me that import statements cannot be resolved

 

My intellij IDEA version: 2019.1 Ultimate

 

 

It cannot event resolve base classes like String

 

My SDK is set up properly

 

Thank you for your help.

 

Maks

1
61 comments

Typically this kind of issues indicate that Maven Project was incorrectly translated into IDEA's Project structure model format.

This may happen, for instance, due to caches corruption.

In such cases this should be resolvable with the following steps:

  1. Close all instances of IDEA
  2. Remove System Directory
  3. Re-import your Project (Open → double-click the root pom.xml → Open as Project)

If the issue persists or occurs regularly, please submit a YouTrack Issue for a detailed investigation.

0

Please sign in to leave a comment.