Search code examples
androidandroid-activityadt

New Android Project named after Main Activity instead of app name


I am creating new android projects in Eclipse Juno with the latest ADT plugin and im running into a problem with the name of the app. Whenever I run the app, it runs fine, but when I go to the app list, the name of the app isnt there. Instead I have a new app named MainActivity which is the name of the first activity in the app. The app_name string is set to the name of the app, but it still doesnt work. I figured out changing the title_activity_main to the name of the application fixed the problem with the wrong app name in the app drawer, but that seems like a backwoods kind of way to fix that. Anyone else experience that problem, or just hating the new ADT like me?

Manifest Code

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.bv.testapp"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="4"
    android:targetSdkVersion="15" />

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name">
    <activity
        android:name=".MainActivity"
        android:label="@string/title_activity_main" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

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


Solution

  • I am also using the updated adt and having the same problem and finally comes out with the only solution which is as follows

    <application
        android:name="GlobalData"
        android:icon="@drawable/hdpi"
        android:label="@string/app_name"
        android:theme="@style/AppTheme">
    
        <activity android:theme="@android:style/Theme.NoTitleBar"
            android:name=".ApplicationCommence"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
    

    Here above the in "@string/app_name" having my project name.