Android app icon gets displayed as the default Android icon instead of the one in my drawable folder

StackOverflow https://stackoverflow.com//questions/24028308

  •  21-12-2019
  •  | 
  •  

Question

I had set all my ic_launcher.png files in the drawable folders of my app. And almost in every occasion, the app icon gets displayed properly. But when it is displayed on my device, only the green Android default icon shows up.

Would anyone know how to debug this situation or why this happens? My device is the HTC One which is a VERY big phone.

Thanks in advance!

Was it helpful?

Solution

uninstall the app and re-install it again maybe because your device caches already the green android icon within it.

OTHER TIPS

Did you place your custom icon in the drawable-xxhdpi folder too?

Android uses the file from the resources that match the device's characteristics as closely as possible. The HTC One has a 468 ppi display, so it would fall into the xxhpdi bucket.

Just a theory, but you might have replaced all the other versions of the icon, and the default icon that Eclipse/Android Studio create by default might be there still.

  1. Make sure the right image is available in all relevant folders
  2. Clean project in eclipse. (If required, restart eclipse)
  3. Run in emulator, so new APK is generated.
  4. Uninstall the existing APK in your mobile phone.
  5. Install the new APK in your mobile phone.

I know this question has been answered but, for those still looking for a solution try this:

make a copy of your apk file and rename it to myapp.zip i.e. change extension from apk to zip (where myapp is the name of your apk file). Extract the zip and take a look inside the res folder which will be in the extracted folder. Verify if the image you are intending to have as your icon is actually there. From there you can either place your icon there and remove the default icon (DO NOT CHANGE the NAME) or manually debug from eclipse or whatever ide your are using. Good luck.

Ok got this problem solved - change user to guest and back. nothing else worked for me (even cleaning launcher cash and reloading phone) . Hope i helped someone good luck

I hit this issue by a silly copy/paste mistake. I added the multidex-line into the AndroidManifest.xml and didn't recognice the '>' at the end.

    <application
        android:name="android.support.multidex.MultiDexApplication" >
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="false"
        android:theme="@style/MyAppTheme">

So the application section ends after the first line, resulting in the default icon. Also the app name (label) wasn't taken. Instead the package name was used. This is the corrected version:

    <application
        android:name="android.support.multidex.MultiDexApplication"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="false"
        android:theme="@style/MyAppTheme">

Make sure you don't have vectorDrawables.useSupportLibrary = true in your build.gradle.

My issue was that I had vectorDrawables.useSupportLibrary = true in my build.gradle under defaultConfig because I was using an ImageButton and setting the source with android:srcCompat instead of android:src

My issue was that another Manifest in the project was also trying to load a launcher icon which was overwriting the icon I set in the app manifest. Check all manifests and make sure only one icon is being set.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top