Koen de baas Koen de baas - 1 year ago 129
Android Question

No resource found that matches the given name (at 'icon' with value ....)

I'm making an android application in eclipse, and I want to upload it to the Google Play store. How ever, the store says that I need to add an Icon to it. I programmed the icon, but it gives the following error:

error: Error: `No resource found that matches the given name (at 'icon' with value '@drawable-hdpi/ic_launcher')`.


I have no idea how to fix it, the image is in my drawable-hdpi folder and is spelled correctly and everything.

Can someone help me out?

This is my AndoidManifest code:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.rodekruis"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />

<application
android:allowBackup="true"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:icon="@drawable-hdpi/ic_launcher" >
<activity
android:name=".MainActivity"
android:label="@string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.DEFAULT" />

<category android:name="android.intent.category.MAINACTIVITY" />
</intent-filter>
</activity>
<activity
android:name=".BezoekActivity"
android:label="@string/title_activity_bezoek" >
<intent-filter>
<action android:name="android.intent.category.DEFAULT" />

<category android:name="com.example.rodekruis.BEZOEKACTIVITY" />
</intent-filter>
</activity>
<activity
android:name=".AfspraakActivity"
android:label="@string/title_activity_afspraak" >
<intent-filter>
<action android:name="android.intent.category.DEFAULT" />

<category android:name="com.example.rodekruis.AFSPRAAKACTIVITY" />
</intent-filter>
</activity>
<activity
android:name=".ContactActivity"
android:label="@string/title_activity_contact" >
<intent-filter>
<action android:name="android.intent.category.DEFAULT" />

<category android:name="com.example.rodekruis.CONTACTACTIVITY" />
</intent-filter>
</activity>
<activity
android:name=".MeningActivity"
android:label="@string/title_activity_mening" >
<intent-filter>
<action android:name="android.intent.category.DEFAULT" />

<category android:name="com.example.rodekruis.MENINGACTIVITY" />
</intent-filter>
</activity>
<activity
android:name=".RouteActivity"
android:label="@string/title_activity_route" >
<intent-filter>
<action android:name="android.intent.category.DEFAULT" />

<category android:name="com.example.rodekruis.ROUTEACTIVITY" />
</intent-filter>
</activity>
<activity
android:name=".SpecialistenActivity"
android:label="@string/title_activity_specialisten" >
<intent-filter>
<action android:name="android.intent.category.DEFAULT" />

<category android:name="com.example.rodekruis.SPECIALISTENACTIVITY" />
</intent-filter>
</activity>
<activity
android:name=".BWCActivity"
android:label="@string/title_activity_bwc" >
<intent-filter>
<action android:name="android.intent.category.DEFAULT" />

<category android:name="com.example.rodekruis.BWCACTIVITY" />
</intent-filter>
</activity>
<activity
android:name=".AgendaActivity"
android:label="@string/title_activity_agenda" >
<intent-filter>
<action android:name="android.intent.category.DEFAULT" />

<category android:name="com.example.rodekruis.AGENDAACTIVITY" />
</intent-filter>
</activity>
<activity
android:name=".InfoActivity"
android:label="@string/title_activity_informatie" >
<intent-filter>
<action android:name="android.intent.category.DEFAULT" />

<category android:name="com.example.rodekruis.INFOACTIVITY" />
</intent-filter>
</activity>
<activity
android:name=".VriendActivity"
android:label="@string/title_activity_vriend" >
<intent-filter>
<action android:name="android.intent.category.DEFAULT" />

<category android:name="com.example.rodekruis.VRIENDACTIVITY" />
</intent-filter>
</activity>
<activity
android:name=".FoldersActivity"
android:label="@string/title_activity_folders" >
<intent-filter>
<action android:name="android.intent.category.DEFAULT" />

<category android:name="com.example.rodekruis.FOLDERSACTIVITY" />
</intent-filter>
</activity>
<activity
android:name=".NieuwsActivity"
android:label="@string/title_activity_nieuws">
<intent-filter>
<action android:name="android.intent.category.DEFAULT" />

<category android:name="com.example.rodekruis.NIEUWSACTIVITY" />
</intent-filter>
</activity>
</application>

</manifest>

Answer Source

Try this android:icon="@drawable/ic_launcher" in the applicaiton node. The system will automatically choose the right drawable folder (hdpi, xhdpi, ...) according to the pixel density of the device which run the application.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download