How to change package name, app name and project name in android?

Modify project name, app name and package name step by step

When you create a new project in android studio, the project name is the default. If you forget to change the project name, then android studio gives the facility to change the project name, package name, and app name.

You change the project name, app name and package name at any time. After the project is completed, you can change project_name app_name package_name.

Why do you want to change the package name?

There are many situations when you can decide to change project_name, app_name, package_name.

You created a project in android studio by default name, then you want to change the name.

Also Read: Material design EditText

You downloaded source code from the internet and you want to rename project_name app_name package_name.

What will we learn in this tutorial?

We’ll Change package name in android

We’ll change app name in android

We’ll Change the project name in android

Let’s see in detail how to change project_name, app_name and package_name step by step.

Step 1:

How to change the package name in android?

First, we will rename the Android Studio package. You can directly change the package name by AndroidManifest file.

Double-click on “AndroidManifest.xml”

As in the image below

Change the package name android

After, open “AndroidMainfest.xml” right-click on your package name.

For example

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.shareappon">

Mouse over “Refactor” and click on “rename…” as shown in the below image

Rename package name in android

Showing warning dialog, as shown as below image

Rename package in android

Just click on “rename package

After you clicked, the new window opens. Here, type the new name of your project, as shown below image.

new name package in android

Then click on “Refactor

Open Refactoring Preview as shown below image

Click on "do factor" to change  package name in android studio

Click on “Do Refactor”.

Finally, your project package name has been changed successfully. See the below image.

Your project package name has been changed successfully in android studio

Now, we will change the app name in android.

Step 2:

How to rename app name in android

Let’s change the android app name.

You can easily change the name of the app.

Also Read: Click two time back button to exit

Go to values ⇾ Strings.xml.

As shown below image.

Click on string.xml and change app name in android studio

For example

<resources>
    <string name="app_name">ShareAppOn</string>
</resources>

You have successfully changed the app name in Android.

Now, let’s change the project name.

Step 3:

How to rename project name in android

Go to Gradle Scripts ⇾ settings.gradle.

As shown in the below image

settings.gradle file, project settings file in android studio

For example

include ':app'
rootProject.name = "ShareAppOn"

After rename, click on the “sync Now” link.

Your project name has been changed successfully, just restart your android studio.

After restating android studio, your project name has been changed.

Also, you can see the package name, app name and project name also have been changed.

See below image

Package name, app name and project name has been change in android studio

Watch on YouTube

Leave a Reply