I am trying to create a new module in my project. As soon as I specify the name of the module, Intellij throws "That this module already exists". After I exit the wizard it creates a directory with same module name but doesn't make it a module. I delete the directory and I perform "Invalidate Caches and Restart" but still the error persists.
Import an existing moduleFrom the main menu, select File | New | Module from Existing Sources. In the dialog that opens, specify the path the . iml file of the module that you want to import, and click Open. By doing so, you are attaching another module to the project without physically moving any files.
An IML file is a module settings file created by IntelliJ IDEA, an Integrated Development Environment (IDE) used to develop Java applications. It stores information about a development module, which is a Java, Plugin, Android, or Maven component of a Java application.
I had this issue and went to .idea/modules.xml
, found the path with the name I wanted, and deleted that line (just did ctrl+f with the name). After deleting that line and saving the file, I was able to create the module with that name.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With