Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rename root module in android studio

Tags:

How to rename root module in android studio? I have tried (right click the module then click refactor then click rename) but I got warning "can't rename root module"

like image 731
Meli Oktavia Avatar asked Aug 11 '16 02:08

Meli Oktavia


People also ask

Can I change package name Android?

Step 1: To rename package name in Android studio open your project in Android mode first as shown in the below image. Step 2: Now click on the setting gear icon and deselect Compact Middle Packages. Step 3: Now the packages folder is broken into parts as shown in the below image.

Can I change project name in Android Studio?

First, open the project directory by right-clicking on the project name and click at show in explorer option. Step 2: Close the android studio, and go to the window explorer of the project directory and rename the root folder with a new name.

Where is the root folder in Android Studio?

Inside the main directory you have two directories named java and res . The java directory is the root of the Java source code for the Android app.


2 Answers

I pressed Ctrl+Shift+F to search my current root module name and found the name to be in the settings.gradle file as rootProject.name=.... I renamed it and synced the project (File -> Sync Project with Gradle Files) and the root module name was updated.

like image 86
Tarasantan Avatar answered Sep 18 '22 15:09

Tarasantan


In root of your project open setting.gradle and change rootProject.name='YOUR NEW NAME'

then close and restart android studio

like image 27
A Hashemi Avatar answered Sep 20 '22 15:09

A Hashemi