首页 > 其他 > 详细

IntelliJ Cannot find declaration to go to----解决方案

时间:2020-05-29 18:40:40      阅读:47      评论:0      收藏:0      [点我收藏+]

从git上拉取下来项目以后,每个class文件图标都是灰色的,进去里面ctrl+鼠标左键跳转不了别的类,而且系统中有这些类,却一直提示 Cannot find declaration to go to。

百度了很多方法,什么关掉当前项目然后重新import啊,什么项目右键Mark directory as --> Sources root之类的通通不管用。

直到看到了这个方法,在此记录一下,日后慢慢研究。

原文链接:https://www.cnblogs.com/ShaYeBlog/p/11250035.html

附上解决方法:

  1. close the project in intellij.    关闭当前idea中的项目
  2. close intellij.    关闭idea
  3. go to the project folder and delete the .idea folder    前往项目的文件夹中删除.idea文件夹
  4. restart intellij and open the project (wait for the indexing to finish) and it would work.    重新启动idea并且打开修改后的项目等index更新完成就可以了

其实本人我的操作是直接去文件夹里把.idea文件删了,然后再file -> InvalidateCaches/restart -> InvalidateCaches/restart重启完idea以后项目就好使了哈哈

 

IntelliJ Cannot find declaration to go to----解决方案

原文:https://www.cnblogs.com/sapoo/p/12988726.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!