简体   繁体   English

如何修复损坏的 Intellij Idea?

[英]How to fix a broken Intellij Idea?

When I open an existing Maven project, the IDE shows only those files on the root directory, but not any directories in the project.当我打开现有的 Maven 项目时,IDE 仅显示根目录中的那些文件,而不显示项目中的任何目录。 After a while, the IDE will show the project as what it is in the file structure, but not the directory types such as source code, test when I reopen the project.过了一会儿,IDE会显示项目在文件结构中的样子,而不是源代码等目录类型,重新打开项目时测试。 I reinstall the community edition, but the problem still resists.我重新安装了社区版,但问题仍然存在。 I have experienced the same issue for a few Java projects lately.我最近在几个 Java 项目中遇到了同样的问题。

How to resolve this issue?如何解决这个问题?

1, Please ask another teammate to check if that project really works. 1、请其他队友检查该项目是否真的有效。 Sometimes the application structure already broken, then it is not your local problem.有时应用程序结构已经损坏,则不是您的本地问题。

2, There is a.idea folder in the application, delete it. 2、应用中有一个.idea文件夹,删除。 Or simply, you git clone a new place Important: Please notice if you have edited / created some new files in the original directory, otherwise you would lost them if you delete the application.或者简单地说,你 git 克隆一个新的地方重要提示:请注意你是否在原始目录中编辑/创建了一些新文件,否则如果你删除应用程序,你会丢失它们。

3, Open intellij, and File -> Invalite caches 3、打开intellij,然后File -> Invalite caches

Personally, the second point is recommendated.个人比较推荐第二点。

Try to click on Reload All Maven Projects in Maven tool window:尝试在 Maven 工具 window 中单击Reload All Maven Projects

在此处输入图像描述

If it doesn't help you can try to perform the following actions:如果它没有帮助,您可以尝试执行以下操作:

  • Close the project with File | Close Project使用File | Close Project关闭项目File | Close Project . File | Close Project
  • Close the IDE.关闭 IDE。
  • Open your project in OS file manager and remove all.iml files and the.idea directory.在 OS 文件管理器中打开您的项目并删除所有.iml 文件和.idea 目录。
  • Reimport the project. 重新导入项目。

If the problem remains contact JetBrains support and attach a compressed log folder along with the project structure tree.如果问题仍然存在,请联系JetBrains 支持并附上压缩日志文件夹以及项目结构树。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM