Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rebuild IntelliJ project indexes

People also ask

How do I reindex a project in IntelliJ?

To force reindex a project, use Invalidate caches. Indexing in IntelliJ IDEA is responsible for the core features of the IDE: code completion, inspections, finding usages, navigation, syntax highlighting, and refactorings.

How do I rebuild a project in IntelliJ?

From the main menu, select Build | Rebuild Project for the entire project or Build | Rebuild 'module name' for the module rebuild. IntelliJ IDEA displays the build results in the Review compilation and build output.

Where are IntelliJ indexes stored?

JDK indexes will be downloaded to index/shared_indexes in the IDE system directory. After that, IntelliJ IDEA will be using the suitable indexes whenever they are needed.

How do I clean up and rebuild a project in IntelliJ?

To clean up the local working copy, do one of the following: Select the desired file or directory in the Project tool window and choose Subversion | Cleanup from the context menu of the selection. Open the desired file in the editor and choose VCS | Subversion | Cleanup from the main menu.


File -> Invalidate caches...

(Force rebuild of all caches and indices on next startup)

Restart IntelliJ IDEA.

Caution: This might Remove local history.


Restarting IntelliJ fixed this in my case (Ultimate 2019.1) -- on restarting, it rebuild the indexes by itself.

An interesting side effect, apart from all imports and non-local references coming up as errors, was the error reported on all string literals:

Incompatible types. 
Required: java.lang.String 
Found: java.lang.String