Can't see project folders in IntelliJ IDEA

Intellij Idea

Intellij Idea Problem Overview


Every once in a while, I open an old project and I can't see any of the folders in the intelliJ project viewer. I can see all the files at the root.. but no folders. Yes I can delete the .iml file and .idea folder and re-create the project, but come on.. there's gotta be an easier way to fix this.

Is there?

Intellij Idea Solutions


Solution 1 - Intellij Idea

If you look in project settings (ctrl-shift-alt-s), you should see a module structure. If you instead see "Nothing to see", do the following:

  1. In Project Structure -> Modules, press the + button,
  2. press enter (since, for some weird reason, it won't let me click on "New Module")
  3. In the window that pops up, click on the "..." next to Content root, find your root folder, and select it
  4. Press ok
  5. ignore any warning that says the name is already in use (or to that effect)

Solution 2 - Intellij Idea

the simplest solution worked from me, just delete the .idea folder > keep in mind this will delete all of idea's current project configuration, it'll create the folder with default settings when reload the project again... but all other configuration will be lost if not properly backed-up

Solution 3 - Intellij Idea

It might be because the project didn't have any modules defined. Try adding existing source code by hitting File > New > Module from Existing Sources and select the parent directory of the project for source code

Module from existing sources

Solution 4 - Intellij Idea

Go to pom.xml file -> right click -> maven -> generate source and update folders. You will see your files and folder structures in left hand side.

Solution 5 - Intellij Idea

All the project-specific settings for a project opened through Intellij IDE are stored in the .idea folder.

> The .idea folder (hidden on OS X) in the solution root contains > IntelliJ’s project-specific settings files. These include per-project > details such as VCS mapping and run and debug configurations, as well > as per-user details, such as currently open files, navigation history > and currently selected configuration.

So, if you are not able to see the project file structure in your Intellij IDE, just delete the .idea folder,

> rm -rf .idea

and reload the project, then after reload you'll be easily able to get your project structure displayed.

Solution 6 - Intellij Idea

For me, the java folder was not showing up. I went into File->Project Structure. In the second column, I selected on _main. In the third column, I selected the tab "sources". In what I call the fourth column, where the "+Add Content Root" is shown, I verified, the java source/folder was present. In my case, there was an extra source folder, which was the current location. I removed this, applied and the java folder immediately showed up.

Solution 7 - Intellij Idea

Right click on the Project name -> Open Module Setting -> Check the application context path set it up at your project location.

Solution 8 - Intellij Idea

Check your idea.log -- it may have some details explaining why or what is happening (Help | Reveal log in Explorer). Possibly one of the config files got corrupted.

You can always backup and delete .idea subfolder (project settings) and re-create project from scratch. When it's wroking again (after basic configuration) you may copy some of the files from that folder back to recover some of your settings (if there were many).

Solution 9 - Intellij Idea

This happened to me on a new computer when I opened up a Java project in the newly installed Intellij.

The problem was that I had not installed any JDK on the machine.

I had to install a JDK and then go into the settings at ctrl-shift-alt-s and add a JDK by specifying the folder where I installed it. It's possible that IntelliJ would have found it if I closed it and reopened it.

Solution 10 - Intellij Idea

In my case the solution was to create a new project, specifying the project type and creating it within the same directory path as the project that does not load the project files correctly.

PhpStorm automatically detects that the directory exists and gives you the option to create project from existing sources.

This can be found under: File --> New project...

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionB TView Question on Stackoverflow
Solution 1 - Intellij IdeavikingsteveView Answer on Stackoverflow
Solution 2 - Intellij IdeashahafView Answer on Stackoverflow
Solution 3 - Intellij IdeaHarish GokavarapuView Answer on Stackoverflow
Solution 4 - Intellij IdeaBegineerView Answer on Stackoverflow
Solution 5 - Intellij IdeaVipul LohaniView Answer on Stackoverflow
Solution 6 - Intellij IdeaScottView Answer on Stackoverflow
Solution 7 - Intellij IdeaPJoshiView Answer on Stackoverflow
Solution 8 - Intellij IdeaTikloyView Answer on Stackoverflow
Solution 9 - Intellij IdeaLee MeadorView Answer on Stackoverflow
Solution 10 - Intellij IdeaKoen de BontView Answer on Stackoverflow