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

方法1、如果jdk的类,都提示Cannot find declaration to goto,那么采用如下方式即可解决:

系统中已经有了该类库,还是找不到类提示

  1. close the project in intellij.
  2. close intellij.
  3. go to the project folder and delete the .idea folder
  4. restart intellij and open the project (wait for the indexing to finish) and it would work.

原文地址在这里:https://www.cnblogs.com/sapoo/p/12988726.html

方法2、如果引自其他类库的,则不能用上述方式解决,还在寻找解决方案。

方法1没有起作用。

导入项目的时候使用的是Open而不是Import Project。

原文地址在这里:https://blog.csdn.net/qq_29230875/article/details/106769650

 

posted @ 2021-08-06 16:39  尼兰  阅读(458)  评论(0)    收藏  举报