android - 更改应用程序名称和标签

标签 android android-studio android-manifest android-2.3-gingerbread

Installer window

我想在安装程序窗口中更改应用程序名称和标签(见附图)。默认情况下,名称和标签是包名称。即使我在 AndroidManifest.xml 中添加了自定义名称和标签,它也没有反射(reflect)在这个安装程序窗口中。

AndroidManifest.xml 如下。

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.style"
  android:versionCode="1"
  android:versionName="1.0">
<uses-sdk android:minSdkVersion="10" />

<application android:icon="@drawable/icon" 
            android:label="@string/app_name">
    <activity android:name=".StylePageActivity"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

</application>
</manifest>

strings.xml(或/res/values/base-strings.xml)中的自定义名称是

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

最佳答案

您可以在 AndroidManifest.xml 中更改应用程序的名称(或包)在<manifest package="..."部分,您可以通过更改 android:label 来更改应用程序的名称<application> 中的属性标记在同一个文件中。

请注意,更改您的应用程序包实际上会注册为与之前的应用程序完全不同的应用程序(就 Android 而言)。

关于android - 更改应用程序名称和标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6842112/

相关文章:

android - OnDragListener 不适用于 DialogFragment

android - 如何测试 assert 在 Android 中抛出异常

android - 调整图像大小以适应 Imageview

java - 如何在android studio中的whatsapp上自动发送消息

android-studio - 从 Android Studio 导出快捷方式

android - Google Play 上不支持的设备

java - list 中的类集成 : application stopped

AndroidManifest 限制

android - 来自 Android 的 AWS Identity TVM 注册

android - ConstraintLayout 不显示最后一个 child