目录 一、强制性编译二、清除缓存 解决方法:强制性编译一下项目就可以了,也可以清除缓存,不过太麻烦。 一、强制性编译 build -> Rebuild Project 二、清除缓存 File -> Invalidate caches,点击确认之后,idea就自动重启了,比较麻烦,不建议使用。