Reputation: 18639
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!
Upvotes: 2
Views: 6379
Reputation: 18
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.
Upvotes: 0
Reputation: 81
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
Upvotes: 0
Reputation: 1
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">
Upvotes: 0
Reputation: 394
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
Upvotes: 1
Reputation: 169
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.
Upvotes: 1
Reputation:
Upvotes: 1
Reputation: 26198
uninstall the app and re-install it again maybe because your device caches already the green android icon within it.
Upvotes: 2
Reputation: 55350
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.
Upvotes: 1