Leandros
Leandros

Reputation: 16825

IntelliJ shows wrongly not resolved imports

Since yesterday my IntelliJ IDE is a bit messed up.

The imports, for example all of the android.support.v4 or com.google.analytics package, are shown as not resolved and red highlighted in the editor. Nevertheless compiling and running the project works fine.

Any ideas how to fix this? It's a mayor blocker.

Upvotes: 0

Views: 792

Answers (2)

juliangonzalez
juliangonzalez

Reputation: 4381

I tried the selected answer but it did not work. Instead I noticed that putting the cursor on the missing Class (marked in red) and waiting for the suggestion tooltip, it has an option of: add library 'Gradle:yourmissinglabrary' to your classpath

Once you click that option the cannot resolve symbol 'ClassName' dissapear

Upvotes: 0

CrazyCoder
CrazyCoder

Reputation: 401945

In case everything builds and works fine, just not the editor highlighting, the first thing to try is File | Invalidate Caches and restart the IDE.

Upvotes: 4

Related Questions