It seems every imported classes in the Java project in IntelliJ IDEA cannot be recognized and marked as red. Why?
The solution is here. The reason is that the cache of IntelliJ IDEA is corrupted. You just need to “Click File -> Invalidate Caches and restarting the IDE”.