Rename the root module of my project in Intellij

Viewed 8428

I want to rename the root module of my java project, however I'm getting an error "Can't rename root module". I'm using Intellij Idea 2019.3.2. I'm also using gradle as the build tool.

4 Answers

You can rename the root module of your java project, following these steps:

Go to Project Structure (Ctrl+Alt+Shift+S) → Project Settings / Project → Project name: Project name:

Open the settings.gradle file and rename the rootProject.name rootProject.name

Once done, delete the .idea folder from your root project folder, rename your project folder on your system and then restart IntelliJ.

I'm not familiar with grandle.
But there ist a way that worked for me in IntelliJ:

File > Project Structure > Project > Project Name
(Alternative Strg-Shift-Alt-S) > Project > Project Name

Maybe this can help you

You can rename the directory's name and restart idea.

Close the project and rename files in .idea/modules, than you can also rename the root folder and just open it again.

Related