IDEA 报错 Package ‘java.util‘ is declared in module ‘java.base‘, which is not in the module graph

在 IDEA 中更改了 JDK 版本之后报错:Package 'java.util' is declared in module 'java.base', which is not in the module graph,项目中的所有 java.util 和 java.lang 包的代码全部带红色波浪线

解决方法:清理 IDEA 缓存:
File -> Invalidate caches -> select "Clear file system cache and Local history" -> Invalidate and Restart