Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change name under launcer icon

I did not find a precise answer to understand how to change the name under a launcer icon of and android app (with Eclipse).

I tried editing "@string/app_name" in application (manifest), but it does not work. And now in the MainActivity.java it gives me the error "R cannot be resolved to a variable" in this line: getMenuInflater().inflate(R.menu.activity_main, menu);

It gives me back this error also if write back "app_name" in @string/ inside application. I'm going crazy.

like image 312
volso Avatar asked Feb 07 '13 15:02

volso


1 Answers

Look for android:label inside <Activity> that has

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

inside <intent-filter> and change its value:

<activity
    android:name=".Activity_1_1_Splash"
    android:label="@string/app_name"
    android:screenOrientation="portrait" >
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />

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

And if you want to change the resource value, @pratik's answer will guide you.

like image 66
ariefbayu Avatar answered Sep 21 '22 07:09

ariefbayu