关于idea报错"cannot access class "

代码在eclipse里是没问题的,在idea里也可以正常运行,但是就是爆红,显示 cannot access XXXX class,强迫症的我怎么能忍???!

image-20220123143646849

解决方案

  • 方案一:

    重启idea(如果不行,就用方案二)

  • 方案二:

    重启无效果,File -> Invalidate Caches -> Invalidate and Restart

    image-20220123143416424

    image-20220123143450294

Logo

一站式 AI 云服务平台

更多推荐