java 在 Android Studio 中更改应用程序名称

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/34610219/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-02 23:06:55  来源:igfitidea点击:

Change App Name in Android Studio

javaandroidandroid-studio

提问by Mahfuz Ahmed likhon

guy's there is a problem with android studio.I make a splash screen in Manifest then I run the app in emulator the app name is splash.see the screnshot. ScreenShot1

伙计,android studio 有问题。我在 Manifest 中制作了启动画面,然后在模拟器中运行该应用程序,应用程序名称是 splash.see the screnshot。 截图1

Screenshot

截屏

<resources>
    <string name="app_name">Times Table</string>
    <string name="action_settings">Settings</string>
    <string name="title_activity_splash">Splash</string>
</resources>

need help.

需要帮忙。

回答by Drilon Blakqori

go to your values/strings.xml and change this

转到您的 values/strings.xml 并更改它

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

to

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

回答by ianmanda

You need to check 2 things here

你需要在这里检查两件事

  1. Your Android Mainifest show have something like this

        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    

  1. 你的 Android Mainifest 节目有这样的东西

        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    

and navigate to Strings under Values, ensure you find this line inside your code

并导航到值下的字符串,确保在代码中找到这一行

<string name="app_name">Your App Name HERE</string>

So the String you are referencing to is "app_name"

所以你引用的字符串是“app_name”

回答by Aditya Vyas-Lakhan

you can change your name form string.xml

你可以改变你的名字形成 string.xml

like this

像这样

<string name="app_name">Your App Name</string>

回答by Parag Kadam

You can change the name of your app by making changes in your strings.xml,

您可以通过在 strings.xml 中进行更改来更改应用程序的名称,

<string name="app_name">Your App Name</string>And make sure that it is linked to the labelattribute of applicationtag in your manifestfile.

<string name="app_name">Your App Name</string>并确保它链接到文件中labelapplication标签属性manifest

<application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
...
</application>

回答by Krishna

What it takes is your launcher activities label. Hence go to your manifest check its label and change it to whatever you want.

它需要的是您的启动器活动标签。因此,转到您的清单检查其标签并将其更改为您想要的任何内容。

 <activity
        android:name=".YourStartActivity"
        android:label="@string/your_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

Create your_name string in strings.xml . Should work . Hope it helps.

在 strings.xml 中创建 your_name 字符串。应该管用 。希望能帮助到你。

回答by whd.nsr

change the title of the LAUNCHER activity, in your case the SplashActivity, so put he title you want int the title_activity_splash resource.

更改 LAUNCHER 活动的标题,在您的情况下是 SplashActivity,因此将您想要的标题放入 title_activity_splash 资源。