IntelliJ does not show project folders

后端 未结 30 2274
孤独总比滥情好
孤独总比滥情好 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 07:41
    1. 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)

    2. Go to the directory where you have your project installed and delete the ".idea" folder.

    3. Reopen the Project.

    That should fix it. It worked for me in May 2018.

    0 讨论(0)
  • 2020-12-07 07:41

    Project Structure => Modules => Select your module => Paths => Make sure "Inherit project compile output path" is selected

    0 讨论(0)
  • 2020-12-07 07:42

    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:

    • 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

    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$/..">
    
    0 讨论(0)
  • 2020-12-07 07:44

    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

    0 讨论(0)
  • 2020-12-07 07:45

    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.

    0 讨论(0)
  • 2020-12-07 07:46

    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
    0 讨论(0)
提交回复
热议问题