IntelliJ does not show project folders

后端 未结 30 2272
孤独总比滥情好
孤独总比滥情好 2020-12-07 07:37

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 p

相关标签:
30条回答
  • 2020-12-07 08:00

    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:

    1. Open Project Settings -> Modules
    2. If Excluded is highlighted, click on it
    3. Click Apply or Close

    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.

    0 讨论(0)
  • 2020-12-07 08:03
    1. close intellij
    2. delete .idea folder
    3. restart intellij
    4. click import, select your project
    5. create project from existing sources, click next, next, next

    And you should be good to go.

    0 讨论(0)
  • 2020-12-07 08:03

    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.

    0 讨论(0)
  • 2020-12-07 08:04

    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.

    0 讨论(0)
  • 2020-12-07 08:04

    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

    0 讨论(0)
  • 2020-12-07 08:04

    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.

    0 讨论(0)
提交回复
热议问题