我对IntelliJ有问题。在左边的项目视图中没有显示任何文件夹。 我的设置是“查看为:项目” 我如何管理它,以便再次显示文件夹和包? 我什么都不知道,因为我没有改变任何选项!
我使用的是IntelliJ 10.0.3。 我正在做一个Maven升降机项目。
我对IntelliJ有问题。在左边的项目视图中没有显示任何文件夹。 我的设置是“查看为:项目” 我如何管理它,以便再次显示文件夹和包? 我什么都不知道,因为我没有改变任何选项!
我使用的是IntelliJ 10.0.3。 我正在做一个Maven升降机项目。
当前回答
我是IntelliJ IDEA 2016.2的新用户。当我第一次运行该程序时,我打开了一个现有的项目,并且有相同的问题,其中它只显示根目录中的文件在1。项目面板,而不是项目文件夹(可展开的树状结构)。
最初,我尝试去项目设置>模块,那里没有显示列出的模块。我点击(+),并试图选择我的根文件夹,但它不会选择文件夹。
所以我用以下步骤来解决这个问题:
Exit IntelliJ Delete the existing .idea folder (i.e. rm -rf .idea) Restart IntelliJ Verified that the project root folder now appeared (in Project Settings > Modules) Toggle On the toolbar buttons (i.e. 1. Project Structure) to display on the left sidebar (clicked View > Toolbar Buttons until tick appears) Click 1. Project Structure toolbar button until its sidebar is revealed Click the arrow icon on the left of your project's root directory name that appears to expand the tree folder structure
2017年9月2日更新:如果你已经添加了一个模块SDK,并且它在你的项目根目录的子目录中添加了一个。iml文件,这导致它加载模块子目录,那么你可能需要修改这个。iml文件,通过追加/..如下图所示。
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$/..">
其他回答
尝试重新导入Maven项目。|文件类型|忽略文件和文件夹。
所以在问了另一个问题后,有人帮我弄清楚,在文件>项目结构>模块下,应该有东西在那里。如果它是空的(显示“Nothing to show”),执行以下操作:
在文件>项目结构>模块中,点击“+”按钮, 按Enter(因为奇怪的是它不让我点击“新建模块”) 在弹出的窗口中,单击“…”next按钮,它将带您到Content根目录。找到您的根文件夹并选择它 点击“确定”按钮 忽略任何提示该名称已被使用的警告
因为我有同样的问题,上面没有一个对我有效,这就是我所做的!我知道这是一个暴躁的解决方案,但至少它最终起作用了!我不知道为什么只有这种方法有效。应该是我电脑里的某个奇怪缓存吧?
I did close IntelliJ I did completely remove the .idea folder from my project I did move the folder demo-project to demo-project-temp I did create a new empty folder demo-project I did open this empty folder with intelliJ I did move all the content demo-project-temp. Don't forget to also move the hidden files Press right click "Synchronize" to your project You should see all the files and folders now! Now you can also safely remove the folder demo-project-temp. If you are on linux or MAC do it with rmdir demo-project-temp just to make sure that your folder is empty
我不得不退出Intellij并删除。idea文件夹(我先把它藏起来,以防万一)。然后我重新打开了这个项目,这对我来说很有效。 不要忘记在此之前保存你的配置(例如调试/运行配置),因为它们也会被删除。
intellij密切 删除。idea文件夹 重启intellij 单击导入,选择您的项目 从现有资源创建项目,单击下一步,下一步,下一步
你应该可以出发了。