There are a few possible reasons why IntelliJ might show a "Cannot resolve symbol" error while still being able to compile your code.