views:

62

answers:

1

I made an icon and saved it in res/drawable directory as icon.png and edited the line <application android:label="@string/app_name"> in AndroidManifest.xml to <application android:icon="@drawable/icon" android:label="@string/app_name">.

But on restarting the emulator, the icon doesn't get displayed. There are no other icon.png files in the project.

AndroidMainifest.xml :-

    <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="android.com.machineInfo"
      android:versionCode="1"
      android:versionName="1.0">
    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".machineInfo"
                  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>
    <uses-sdk android:minSdkVersion="8" />

</manifest> 
A: 

If you have both res/drawable and family of res/drawable-... (where ... is ldpi, mdpi or hdpi) folders then for standard emulator configuration (HVGA skin) file from res/drawble-mdpi has precedence over the one in res/drawable.

edit:

see: DevGuide

http://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources

Gawcio