I have an issue with IntelliJ. It doesn't show any folders in my project view on the left. My setting is "View As: Project" How can I manage it so that the folders and packages are shown again? I don't have any clue because I didn't change any options!
I'm using IntelliJ 10.0.3. I am working on a Maven Lift Project.
This question is related to
intellij-idea
I am a new user of IntelliJ IDEA 2016.2. I opened an existing project when I first ran the program and had the same issue whereby it only showed files in the root directory in the 1. Project panel, but not the project folders (expandable tree-like structure).
Initially, I tried going to Project Settings > Modules, where no modules were shown listed. I clicked (+), and tried to select my root folder, but it wouldn't select the folder.
So I then solved it with these steps instead:
rm -rf .idea
)UPDATE 2nd Sept 2017: If you've added a Module SDK and it added a .iml
file within a subdirectory of the root of your project that causes it to load the module subdirectory, then it may be necessary for you to modify that .iml
file by appending /..
as shown below.
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$/..">
You don't have to quit Intellij completely to make this work. Simply close the project that you have open. (You can open any another project to avoid closing it completely)
Go to the directory where you have your project installed and delete the ".idea" folder.
Reopen the Project.
That should fix it. It worked for me in May 2018.
I faced same issue when i deleted the .idea folder.
However, when I tried to invalidate and re-start, the .idea folder got created again but still the folders were not showing up.
I had to 1.close IntelliJ, 2.delete the .idea folder, 3.launch IntelliJ
This fixed the issue.
Even after 5 years, and having some experience with idea, I still have this problem all the times. Here is the simplest solution.
open project
instead of import project
And then, open conf file for your framework, like pom.xml
or build.sbt
or build.gradle
etc and it will automatically prompts to import project
and when you click and when it finishes, your project is mostly setup correct.
I had to quit Intellij and remove the .idea
folder (I stashed it first, just in case). I then re-opened the project and that worked for me.
Don't forget to save your configuration (e.g. debug / run configurations) before that, because they will also be deleted.
OS:Mac && IDE: IntelliJ && Project: Maven build
I have a nodeJs project and lost my folders after removing the /[project_name].iml file.
This restored the folders while preserving my other project settings:
Project Settings > Modules
+ Add Content Root
Try to re-import the Maven project. Also make sure that the project directory name is not excluded in Settings | File Types | Ignore Files and Folders
.
I encountered this problem when the .idea folder was accidentally added to SVN version control. When I took an update --- blooey! I subsequently removed the .idea folder from version control.
Check out answer at
Can't see project folders in 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
Adding this answer for completeness. I was using 15.0.6 and had this problem. I trued to import a module from Maven or Gradle an it went through the process, but the module did not appear. I tried deleting the .idea file and restarting. Uninstalling and installing the latest version (community 2016.2) addressed the problem.
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:
Result: Folders in your project show up again
Really bad bad bad UI design! Source and Excluded buttons look like tabs when they work in fact as "Checkboxes"!
Be careful, just clicking Sources or Excluded seems like an innocent selection of tab without any visible effect, yet it has far-reaching consequences, basically adding or removing files from the build process.
I have deleted the .idea folder. Closed ItelliJ and restarted to open the same project.
It asked to add the content root. That worked for me.
If you have a gradle module with the same name as your projects root folder, the gradle import will replace your toplevel module configuration and change your view completely.
Make sure you have no gradle module with the same name as your root directory.
As I had the same issue and none of the above worked for me, this is what I did! I know it is a grumpy solution but at least it finally worked! I am not sure why only this method worked. It should be some weird cache in my PC?
.idea
folder from my projectdemo-project
to demo-project-temp
demo-project
demo-project-temp
. Don't forget to also move the hidden filesdemo-project-temp
. If you are on linux or MAC do it with rmdir demo-project-temp
just to make sure that your folder is emptyI had this issue as well. It is something do with .idea just delete it and restart IntelliJ
I have that little while earlier and solved it by following the steps provided below:
a. Right-click on the `External Libraries` and select the `Load/ Unload modules` button
b. If you see the modules are already loaded, perform the load/unload again.
After I have done that, I see the project again in the top of the External Libraries
section. I use Linux machine, BTW
And you should be good to go.
Deleting .idea/workspace.xml
worked for me. Close the project, delete .idea/workspace.xml
, and open the project again. I was using version 2019.1.
I had the problem after an upgrade from intellij 15 (v143) to 2016.3 (v163). I also had an intermittent error on startup about a "Load error: undefined path variables" with a cryptic variable name.
After countless attempts at most solutions presented here (reimport the project, invalidate caches & restart, checks of project structure and paths...), the only thing that worked was to completely reinstall Intellij (removing the ~/.idea* ~/.IntellijIdea*) and selecting "No" at the question "would you like to migrate previous settings".
This finally worked.
Select the module settings and do these changes, it will work
In File > Project Structure > Modules, click the "+" button,
add new module as per your project specific like Java or RUBY or something then apply and ok
I just had the same problem with an SBT project in IntelliJ 2016.2 after removing a globally installed IntelliJ and re-installing in my own home folder (Linux). No files or folders were shown in Project View anymore.
The Project Structure view wouldn't even open, and renaming the .idea
folder to .idea.bak
and re-importing the project didn't make any difference.
However, what fixed it for me was to reboot Linux. Afterwards it worked again, even with the original .idea
folder. Seems this "fix" is not only restricted to the Windows world.
Intellij imports the project after resolving all the dependencies. In my case, it was unable to resolve dependencies for some of the modules and was stuck there. I had to copy my Maven settings.xml
from local repo to the default .m2
folder in order to point it to the correct local repo.
If you're trying to open a scala/sbt project, the sbt version set in /project/build.properties
must match the sbt version installed on your system or intellij won't detect your project's modules properly.
Once that's done, you can just delete the idea
folder and restart as the other answers suggest.
I went to File -> Project Structure -> Modules clicked on + and then import module found my root folder and selected it.
It worked.
For IntelliJ 14
For me, it happens when i set Project SDK
as JAVA SDK 14 in a react-native project. Upon unset, all the folders show up again.
For me in IntelliJ it was showing me a popup to import the existing project as gradle project. I just clicked ok on it and then the folder structure appeared properly.
Project Structure => Modules => Select your module => Paths => Make sure "Inherit project compile output path" is selected
I tried all the solutions above, nothing worked.
Java-Maven project
My problem: In my case i had java-maven project. And the problem was that Idea by default uses it's bundled maven for projects(or anyone you trying to open). I noticed that bundled maven keeps downloading dependencies forever, i.e you never see your sources folder.
Solution:
So to configure that, one needs to configure Idea to use maven(mvn) which is installed on the machine for all projects by default.
To do that, in the beginning when Idea still did not open any projects...there is a configure button. There chose build tools. Then maven, there you will see dropdown list where you can choose local maven.
In short: Configure/Build Tools/Maven/DropdownMenu
(My OS: linux branch)
Hope that helps
Source: Stackoverflow.com