我对IntelliJ有问题。在左边的项目视图中没有显示任何文件夹。 我的设置是“查看为:项目” 我如何管理它,以便再次显示文件夹和包? 我什么都不知道,因为我没有改变任何选项!

我使用的是IntelliJ 10.0.3。 我正在做一个Maven升降机项目。


当前回答

如果你试图打开一个scala/sbt项目,在/project/build中设置sbt版本。属性必须与系统上安装的SBT版本匹配,否则intellij将无法正确检测项目的模块。

一旦完成了这些,你就可以删除想法文件夹,并按照其他答案的建议重新启动。

其他回答

操作系统:Mac && IDE: IntelliJ &&项目:Maven构建

导航到文件>项目结构>模块。 在右边区域;将显示模块列表。 删除所选的默认选项,并关闭IntelliJ。 再次开放;IntelliJ将询问您是否要处理该项目 Maven项目。 接受弹出窗口,您就可以开始了。

I have a better solution that worked for me and it might work for you. No need to delete the whole .idea folder as this way you lose the whole project. It is possible that you just accidentally excluded all folders in project settings. I also found that project folders disappeared. I was trying to find out how to disable indexing, so I was looking at Project Settings -> Modules and I clicked on Excluded to see if I could add the whole project there to ignore it for indexing. It didn't do anything and I couldn't drag and drop the folder under Excluded. What I didn't realize is that simply clicking "Excluded", IntelliJ automatically moves the folder to Excluded and all folders disappeared in Project Explorer. "Excluded" button changes background to gray, which means exclusion is active. This is a very poor user interface because it is hardly noticeable and clicking this button has a far-reaching impact on your project.

Fix:

打开项目设置->模块 如果“排除”突出显示,单击它 单击应用或关闭

结果: 项目中的文件夹再次显示出来

非常糟糕的UI设计!源和排除按钮看起来像标签时,他们的工作实际上是“复选框”!

注意,仅仅单击Sources或Excluded似乎是一个没有任何可见效果的选项卡选择,但它具有深远的影响,基本上是从构建过程中添加或删除文件。

你不必完全退出Intellij来完成这个工作。只需关闭已打开的项目。(您可以打开任何其他项目,以避免完全关闭) 转到已安装项目的目录并删除“。想法”文件夹中。 重新打开项目。

这应该能解决问题。它在2018年5月对我有效。

我点击文件→项目结构→模块,点击+,然后导入模块,找到我的根文件夹,选择它,它就工作了。

对于智能 14。

对我来说,当我在一个反应原生项目中将项目SDK设置为JAVA SDK 14时,就会发生这种情况。在取消设置时,所有文件夹再次显示。