是否有一种方法可以在不创建新项目的情况下更改应用程序的名称(Launcher App Label) ?

注意:手机主屏幕上的启动器图标上显示的应用程序名称和标签可能不同。

示例:在我的移动应用程序所在的主页上,我有一个图标和名称Foo,但我想将名称更改为Bar。我能这样做吗?


当前回答

你可能不得不改变你的主活动“android:label”的名称,也解释在命名我的应用程序在android

其他回答

这在Android Studio中很简单,

进入:res文件夹->值->字符串.xml

将app_name(在下例中为MitsuhoSdn Bhd)更改为您想要的任何新名称。

<string name="app_name">MitsuhoSdn Bhd</string>
<string name="hello_world">Hello world!</string>
<string name="menu_settings">Settings</string>

要在Android Studio或Eclipse中更改Android应用程序的名称,您必须更改AndroidManifest.xml中<application>节点内定义的属性Android:label的值

 android:label="My Cool Application!"

默认情况下,应用程序的名称被引用到strings.xml文件中定义的字符串,例如:

 android:label="@string/app_name"

因此,我们必须改变strings.xml文件中的值:

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

如果您在这里是因为当您尝试使用播放控制台上传您的新/全新应用程序时,它显示以下错误: "您必须使用另一个包名,因为"some.package.name"已经存在于谷歌Play中。"

你只需要去你的场地。Gradle文件(您的应用程序)和更改

applicationId“some.package.name”

to

applicationId“some.package.different-unique-name”

这里的其他答案没有修复这个错误。

Manifest文件的变化并没有改变应用程序的名称,

<application android:icon="@drawable/ic__logo" android:theme="@style/AppTheme" android:largeHeap="true" android:label="@string/app_name">

但是改变MainLauncher中的Label属性对我来说很有用。

[Activity(Label = "@string/app_name", MainLauncher = true, Theme = "@style/MainActivityNoActionBarTheme", ScreenOrientation = ScreenOrientation.Portrait)]

在我的情况下,我需要invalidate/cache和重启及其工作