Developing a mobile application is not only writing code, but also carefully configuring all its aspects, including display in the userโ€™s system. Often, novice developers are faced with a situation where, after creating a new project in Android Studio an application on the smartphone screen is displayed with the name "My Application" or "App". This is the default value and must be changed to a unique name for your product before publishing.

Changing the App Name is a basic but critical procedure. Users identify the app precisely by this text under the icon on the desktop. A mistake at this point can be confusing, especially if you plan to release multiple versions or updates. The change process does not require deep knowledge of the architecture, but it does require attention to the project structure and resource files.

In this article we will analyze in detail all the ways to rename an application: from simply editing the manifest file to working with string resources to support multilingualism. We'll also touch on the issue of Package Name, as these concepts are often confused, although technically they are responsible for different entities in the ecosystem Android.

Differences between the application name and the package name

Before making changes to the code, it is necessary to clearly understand the difference between the two key identifiers. App Name is what the user sees on the screen of their device. This is a text label that can be changed at any time without affecting the operation of the app's internal logic. It is stored in resources and can be localized into different languages. At the same time, (package name) is a unique technical identifier of the application in the system and in the store. It has a domain name format, for example

At the same time Package Name (package name) is the unique technical identifier of the application in the system Android and in the store Google Play. It has a domain name format, e.g. com.example.myapp. It is by this identifier that the operating system distinguishes your app from thousands of others. Changing the package name after publishing the application to the stack is not possible without creating a completely new project.

โš ๏ธ Warning: Never try to change the Package Name manually in code files unless you understand the consequences. This may cause the system to no longer recognize the application as an updated version of the previous one, and users will not be able to receive the update.

For the purposes of this instruction, we will focus specifically on changing the name visible to the user. However, if you are just starting a project, take the time to choose a unique prefix, since changing it later will be extremely time-consuming.

Understanding this dichotomy will save you from many mistakes in the future. When you solve the problem of โ€œhow to change the name,โ€ you almost always mean the resource string, and not the technical identifier. Confusion here can cost you time debugging obscure compilation errors or signature conflicts.

๐Ÿ“Š What is more difficult for you to change in a project?
App Name
Package Name
Name in code (Class Name)
I donโ€™t know the difference

Editing the AndroidManifest.xml file

The most direct, although not always recommended for large projects, way to change the name is to edit the application manifest. The file AndroidManifest.xml is a passport of your application, which describes all its components, permissions and basic settings. Attribute android:label in tag application is responsible for what name will be displayed in the launcher.

By default in new projects Android Studio this attribute often refers to a string resource, for example @string/app_name. However, some developers may write the name strictly, right in the manifest. To check this, open the manifest file in the app/manifestsdirectory. Find the line starting with tag <application.

If you see a direct indication of text there, for example android:label="My Old App", you can replace it with the new name right here. But this approach is considered bad practice, as it complicates localization. It is much more correct to use a link to the resource. If the attribute already contains a link like @string/app_name, then there is no need to change the text directly in the manifest - the changes are made to the resource file.

<application

android:allowBackup="true"

android:icon="@mipmap/ic_launcher"

android:label="@string/app_name"

android:roundIcon="@mipmap/ic_launcher_round"

android:supportsRtl="true"

android:theme="@style/Theme.MyApp">

Pay attention to the attribute value label in the example above. The symbol @ instructs the compiler to substitute the value from the resource file. This provides flexibility: you can change the name for all locales at once by editing just one file, or create different names for different languages.

๐Ÿ’ก

Use resource links (@string/..) instead of hard-coding text in the manifest. This is an industry standard that makes it easier to support the application in the future.

Changing string resources in strings.xml

The most correct and professional method of changing the name is editing the file strings.xml. This file is located in the folder app/src/main/res/values. This is where all text constants used in the interface and system settings of the application are stored. This approach allows you to easily manage texts and avoid code duplication.

Open the file res/values/strings.xml. Inside the tag <resources> you will find a line with the name app_name. It looks something like this: <string name="app_name">My Application</string>. You need to replace the text between the tags with the desired name of your product. Save the file using the key combination Ctrl + S (or Cmd + S on Mac).

After saving the changes Android Studio will automatically index the project. The next time you build and run it on an emulator or real device, you will see a new name under the icon. This method ensures that the title changes wherever the resource is used, including the title @string/app_name, including header ActionBar or Toolbarif configured by default.

It is important to note that in modern versions Android and support libraries the title is in the status bar bar) or in the phone settings is also often taken from this resource. Therefore, the change here is a comprehensive solution to the problem. Don't forget to also check files for other languages if your project supports multilingualism.

  • ๐Ÿ“‚ Open the directory app/src/main/res/values in the project window.
  • ๐Ÿ“ Find the file strings.xml and open it by double clicking.
  • โœ๏ธ Locate tag <string name="app_name"> and change the content.
  • ๐Ÿ’พ Save the file and build the project (Build โ†’ Make Project).

If your project uses different names for different configurations (for example, tablets or landscape), make sure you edit the correct file. Typically the base value lies in the folder values, and specific ones - in values-sw600dp or similar. For regular renaming, editing in the base folder is enough.

Setting the display name via Gradle

Modern projects often use an approach in which the application name is set dynamically through the build system. Gradle. This allows you to have different names for the debug and release versions. For example, the version for testers can be called "MyApp Debug", and the version for the store - simply "MyApp".

To implement such a scenario, you need to open the module assembly file, usually app/build.gradle (or build.gradle.kts in projects Kotlin DSL). In the block android -> defaultConfig or inside buildTypes you can set the value of the resource. This is done using the property resValue.

android {

buildTypes {

debug {

resValue"string","app_name","MyApp Debug"

}

release {

resValue"string","app_name","MyApp Official"

}

}

}

Using this method overrides the value from the file strings.xml. If you entered a value in build.gradle, then changes in strings.xml for the corresponding assembly will not be applied. This is a powerful tool for separating development threads, but it can be confusing for a newbie who doesn't understand why editing resources doesn't have an effect.

โš ๏ธ Warning: If you are using resValue in Gradle, make sure that there are no naming conflicts in the file. It is better to leave a stub there or remove the duplicate definition so that the assembly proceeds cleanly. strings.xml there is no name conflict. It's better to leave a stub there or remove the duplicate definition to keep the build clean.

This approach is also convenient for creating โ€œwhite-labelโ€ applications, when the same code is compiled for different customers with different names. You can create different flavor (build options) and give each one a unique name without having to duplicate resource files.

What are Product Flavors?

Product Flavors is a Gradle mechanism that allows you to create different versions of the same application (for example, free and paid, or versions for different countries) from the same source code. For each flavor, you can set a unique package name, application name, icons, and even a set of connected libraries.

Clearing the cache and rebuilding the project

Sometimes developers are faced with a situation: all files are changed correctly, the code compiles without errors, but the old name is still displayed on the device. This is a classic caching problem. Android Studio The device's operating system itself may retain old resources to speed things up, ignoring recent changes.

The first step in this situation should be to clear the cache of the development environment itself. Select File โ†’ Invalidate Caches..from the menu. In the dialog box that appears, make sure that the items for clearing the system cache and indexing are selected, then click the Invalidate and Restartbutton. The studio will restart and re-index all project files.

If this does not help, the problem may be on the device side. When installing a new version of an application over an old one (update), the Android system may not replace some resources if the signature or code version has not changed properly. In this case, you must completely remove the application from the device or emulator before installing it again.

  • ๐Ÿงน Run the command Build โ†’ Clean Project in the Android Studio menu.
  • ๐Ÿ”„ Then select Build โ†’ Rebuild Project for a complete rebuild.
  • ๐Ÿ“ฑ Remove the application from the test device manually through the settings.
  • โ–ถ๏ธ Run the project again to install a โ€œcleanโ€ version.

It is also worth checking whether the instantaneous run option is enabled, which in some cases may skip the full installation of resources. Try disabling it in the launch settings (Run/Debug Configurations) and launch the application as usual. This ensures that all new resources will be correctly packaged into an APK or AAB file.

โ˜‘๏ธ Checklist when the old title hangs

Done: 0 / 5

Localizing the name for different countries

If your application is aimed at the international market, the name should be adapted for users from different countries. Simply translating text in a common file is not enough - you need to create specific resource files for each language. The resource mechanism Android allows you to do this elegantly and efficiently.

To add support for another language, create a new directory in the folder res. The folder name must follow the format values-[language_code]. For example, for the English language create a folder values-en, for German - values-de, for Spanish - values-es. Inside this folder, create a file strings.xml.

In the created file, write the same line with the name app_name, but with the translated value. The system will automatically select the correct file depending on the language settings on the user's device. If a file is not found for a specific language, the value from the default folder will be used values.

Language code Resources folder Name example Region of application
English values-en Super Tool USA, UK
German values-de Super Werkzeug Germany, Austria
French values-fr Outil Super France, Canada
Chinese values-zh China, Taiwan

This approach not only improves the user experience, but also increases the credibility of the application in local app stores. Users tend to download apps that speak to them in their native language, including the name of the icon. This is a simple optimization that can have a positive impact on installation conversion.

๐Ÿ’ก

Correct localization of the application name increases user confidence and improves the visibility of the application in regional stores (ASO).

Frequent errors and ways to solve them

In the process of renaming, developers often make common mistakes that lead to the application crashing or incorrect interface display. One of the most common is a typo in the resource name. If you changed the name in strings.xmlbut left a reference to a non-existent resource in the code or manifest, the compiler will throw an error.

Another problem is related to the length of the name. Although the line may technically be long, on a mobile device screen the long title will be cut off by an ellipsis. This looks unsightly and makes identification difficult. Try to keep the title within 10-15 characters for optimal display on all screen sizes.

Also worth mentioning is the problem with symbols. Use only standard UTF-8 characters. Avoid emoji in the app name unless it is part of your brand, as on some older devices or in certain launchers they may appear as boxes or hide the text altogether.

โš ๏ธ Note: Android Studio interfaces and Gradle versions are constantly updated. The location of some settings may vary. If you do not find the described menu item, use the settings search (Ctrl+Shift+A) or check the official Google documentation.

If after all the manipulations the name has changed in the launcher, but remains the same in the Activity header, check the code of your activity. Perhaps the method onCreate name is hardcoded through the method setTitle("Old Name"). Replace this with setTitle(R.string.app_name) or delete the line so that the value from the manifest is used.

Why does the name not change after editing strings.xml?

Most likely, the problem is in the cache. Try doing File โ†’ Invalidate Caches / Restart. Also make sure that you do not override the value in the file build.gradle via resValueas build settings take precedence over resource files.

Is it possible to use different names for Debug and Release versions?

Yes, this is standard practice. Use blocks buildTypes in the file build.gradle and property resValue to set a unique row name app_name for each assembly type.

Does changing the application name affect statistics in Google Play Console?

No, changing the display name (App Name) does not affect technical statistics, installations or package ID. However, this affects ASO (in-store optimization) and search within the app store.

Do I need to change the name of the files in the Java/Kotlin code?

No, the names of classes and packages in the code are not directly related to the display name of the application. You only need to change class names when refactoring logic, and not to change the name on the screen.

How to change the name of an already published application on Google Play?

This is done through the Google Play developer console. Go to the "Main Store Listing" section and change the "Application Name" field. This does not require updating the APK file, changes take effect after moderation.