IntelliJ IDE | .iml File lost or deleted

前端 未结 10 807
梦谈多话
梦谈多话 2021-02-06 20:07

Last week I was working on a Java EE project with IntelliJ IDE.

Today: As I started up my IntelliJ 2016.1 it gave me the error:

Error Loading Project

相关标签:
10条回答
  • 2021-02-06 21:10

    For Maven projects:

    • Open the Maven Tool Window (for intellij users - right click on the project name and scroll down to the bottom to find the maven tool window) (indicated with this icon: )
    • Click the Reimport All Maven Projects button (indicated with this icon: ).

    Instructions: https://www.jetbrains.com/help/idea/maven-projects-tool-window.html

    0 讨论(0)
  • 2021-02-06 21:10

    I also removed .iml file by accident. Here is how it was resolved:

    1. Closed IntelliJ IDEA
    2. Reopened program
    3. Selected Import Project -> Create project from existing sources
    4. Clicked Next. It created correct project configuration for me.
    0 讨论(0)
  • 2021-02-06 21:10

    If you can't recover it via the most upvoted way, you could simply copy another .iml file, paste it into the package* that requires a .iml file, and rename the .iml file to the name of the package. This should work if it is the same type (in my case UTF-8).

    *Copy the .iml file by going into package files, right-clicking the package name, and press paste.

    You can accomplish this in the left-hand task bar. I have prepared a video demonstration (there's no audio).

    0 讨论(0)
  • 2021-02-06 21:10
    1. delete .idea folder inside your project
    2. re import the project

    it will again compile and build .idea folder for the configuration.

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