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.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With