Android Studio Change Project name exception solution: Can ' t rename root module

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.