简体   繁体   中英

Change App Name in Android Studio

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

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.

go to your values/strings.xml and change this

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

to

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

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> 

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"

you can change your name form string.xml

like this

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

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

<string name="app_name">Your App Name</string> And make sure that it is linked to the label attribute of application tag in your manifest file.

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

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.

更改LAUNCHER活动的标题,在你的情况下是SplashActivity,所以在title_activity_splash资源中添加你想要的标题。

在清单页面的<application>中编辑android:label="appname"的值。

Go to the res folder > values > strings. xml and change the app_name to your new name. Done!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM