When you modify the name of project in Android Studio, you are prompted to "can ' t rename root module."
This is because Android Studio can only modify all files within the root directory, to modify the project root name, only to turn off Android studio to modify the folder name in the operating system.
Specific steps:
1. Close Android Studio.
2. Modify the name directly in the operating system.
3. Re-import the new name ([NewName]) of the project so that it can, quite simply.
In fact, after re-import, Android Studio automatically modifies the references to the names in the relevant project, including the following 2 aspects:
1. The . iml file under the root directory is modified to the name [Newname].iml, and external.linked.project.id=[newname in the file is revised]
2. Modified the . Idea/modules.xml inside the <module fileurl= "file://$PROJECT _dir$/[newname].iml" filepath= "$PROJECT _dir $/[newname].iml "/>
Because these modifications are done automatically by Android studio, there is no need to manually modify them. This will change the name of project to finish.
Android Studio Change Project name exception solution: Can ' t rename root module