How to change the App name and package name in Android Studio

How to change the App name and package name in Android Studio:

Application name can be changed at anytime you want. Even after you publish the App on playstore. The package name is more important. You can’t change it once you publish an App on PlayStore. You will have to publish a different App with a different name if you want a different package.

In this post, I will show you how to change the App name and package name in Android Studio.

Changing the app name:

Changing the application name is easy. It is defined in res -> values -> strings.xml. By default, it is the string under key name app_name.

change app name android studio

    <string name="app_name">My Application</string>

Just change it and you are done.

Changing the package name:

Changing the package name is bit difficult than changing the name because it is used in multiple places of the App. But Android Studio provides an easy way to do that.

  1. First, click on the gear icon on left project panel of Android Studio and unselect the Compact Middle Packages selection. android studio compact middle package
  2. Now, it will show the package in different parts. android studio packages

You need to change middle or last part one by one. Right click on it, click Refactor -> Rename

android studio refactor

Click on Rename package and rename it as showing below :

android studio rename package

Click on Refactor and click on Do Refactor button shown below. Done.

If you want to revert the change, just use Ctrl + Z or Cmd + Z. Here, I renamed the last part of the package. Similarly, you can also use the same approach to rename the middle part of the package.

You might also like: