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

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

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


当前回答

(让我假设你已经选择了Android视图) 应用程序> res > >字符串值

<string name="app_name">Put your App's new name here</string>

其他回答

如果你使用的是android studio,则项目在strings.xml下

<string name="app_name">BareBoneProject</string>

最好在这里更改名称,因为您可能在某处使用过这个字符串。或者图书馆之类的地方用过。就是这样。只要建立并运行,你就会得到一个新名字。记住,这不会改变包的名称或其他任何东西。

这在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>

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)]

是的,你可以。通过更改AndroidManifest.xml中应用程序节点中的android:label字段。

注意:如果你已经添加了启动画面并添加

 <activity
    android:name=".SplashActivity"
    android:label="@string/title_activity_splash_screen"
    android:theme="@style/AppTheme">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
</activity>

到你的启动画面,然后启动器图标的名称将被更改为你的启动画面类名称。

请确保您更改标签:

android:label="@string/title_activity_splash_screen"

在你的strings.xml文件中的启动画面活动。可以在Res -> Values -> strings.xml中找到

点击这里查看更多信息。

(让我假设你已经选择了Android视图) 应用程序> res > >字符串值

<string name="app_name">Put your App's new name here</string>