My applications are behaving oddly when deploying them on the phone. The application icon shows correctly in the applications drawer but in the home screen they show a default android icon. I think this has started happening since I updated to last android studio but I'm not sure of it. Before, everything was ok.
I have been researching this issue but could not find any info about it. Is anyone suffering from this problem? Have you found a solution?
Cheers.
I have seen this on some devices that appear to cache the app icon. In my experience deleting the app from the device and reinstalling has always cured it. This doesn't seem to be a problem when the app icon changes and the app is installed from Google Play, but only when installed via adb, so I don't believe users should see this problem.
I can not comment due to low reputation, so I'm asking that did you place the icon in following folder:
mipmap-mdpi
mipmap-hdpi
mipmap-xhdpi
mipmap-xxhdpi
if not then place your icon in these folder and check.
because now launcher icon should in these folders.
Hope this helps.
Thanks
Related
Starting with Android 12, Google show a toast message with an app icon.
My application have launcher icon. Android 12 splash screen show app icon correctly.
Show toast by code
Toast.makeText(this, "Show simple toast", Toast.LENGTH_LONG).show()
compileSdkVersion/targetSdkVersion 31
android emulator Google play Intel x86 Atom_64 System Image API Level 31, Revision 8.
How can i change this default toast icon?
For me a simple restart of the device did the trick.
I had not restarted my test phone after the update to Android 12 at all. I experienced the same odd bug that a generic app icon was shown in Toasts issued by my app. I tried changing the Manifest as Mickaël‘s answer suggested. No luck. I ended up with the exact same Manifest the app had before I started debugging … and then I restarted the device. My app now displays the correct icon in Toasts reliably. What happened? Unsure. I suspect that a restart may trigger an icon cache refresh that crawls all installed apps in search for new/updated app icons.
Seems like this issue was reported to Google, and assigned to a Google engineer:
https://issuetracker.google.com/issues/202863198
From me the restart of the phone work as well. The toasts now show the proper App Icon, configured in my apps. If it does not work for you please review this statement and check if everything is properly set for you app icon. I hope that this will help :)
https://developer.android.com/studio/write/image-asset-studio
PS: There is one more place from which you can build your app icons https://romannurik.github.io/AndroidAssetStudio/index.html
After running a few tests, I found that setting <application android:icon="#drawable/ic_stat_name" ... with a drawable generated with Image Asset > Notification Icons is overriding the default toast icon.
However, this doesn't work with a drawable generated as Image Asset > Launcher Icons. So at this point, I guess something is missing in Android Studio's generation tool.
I have only just started android programming, but I have a few basics programs working. Normally when I click run in Android Studio and choose my galaxy nexus as a running device, the app I'm running opens and is saved onto my device, so that I can open my program when I am not plugged into my computer.
However, now when I hit run, my program opens, but it is not saved onto my device.
This happened almost immediately after I changed my application label in my manifest file, but I'm not sure if that's related. Any help is appreciated!
Make sure that "deploy the APK" is selected in Run-> Edit Configurations
You have to set it at the new project screen. Its greyed out but theres a link next to it. Just click it. Its next to the Package name and that is the only .app extension you need to execute the apk.
I had the same issue. For me the problem was that the icon was not appearing on the screen but I found the app was actually stored on the device. I have installed NovaLauncher on a Meizu U20. I went to see the "Applications List" (tr. it. "Menu delle app"), I found my app icon there and I drag/dropped it on the screen.
Doing a routine update to an app and decided to update the launcher icon as I have done many times before. However, I'm getting a very strange bug which I had once before but can't remember how I resolved.
I have the right sized icons in each drawable folder and in the manifest the name is correct:
android:icon="#drawable/ic_launcher"
When I try to update the app the old icon remains, on a fresh installation the default launcher icon shows.
I've tried:
Cleaning the project
Restarting Eclipse
Restarting my computer
Restarting the device
A different device
Adding a new set of icons using the Android Icon Set function
Adding a new set using a different filename and changing the name in the manifest
One stange thing that is worth pointing out, if I delete the file ic_launcher.png from a drawable folder, then rename another file to that filename I get this error:
This shouldn't show as the file doesn't exist. This error then shows if I click continue:
Any ideas?
EDIT:
It appears this issue is even more complex than I thought. If I install an app on the emulator the icon appears just fine, on a device it doesn't. If I install the app onto physical devices from the apk, on one device the icon appears and on the other the Package installer crashes!
It seem this is caused by a bug in newer versions of Android. The icons are indeed included in the apk and upload just fine to Play, however it takes a reboot to get them to be shown on my devices (I was wrong above where I said a reboot doesn't work). This means I need to reboot the devices each time I try and new icon, not the end of the world but certainly frustrating.
This problem exists on two different apps I have been working on and two different Nexus devices, I think since they were updated to 5.0.
i got a little problem with installing my app on my smartphone. Its works normal when i am using the standart icon, but after changing the icon, Android studio starts the app on my smartphone normally, but i cant find the app in the app list.
What i am trying to say is that, I cant manually start the App, because its not showing on my Smartphone. Starting throuch Android studio works perfectly fine. I assume its because of my new icon, because the other work fine. I changed the Logo in the different Sizes and just exchanged the old icon with the new one.
Please post a snapshot of your code(xml,java and manifest), without which the forum is unable to help you.
You'll have to first update your icon in the drawable folder only then will you be able to use it in your app.
To make this question more relevant to the general users out there, if you are having problems with your app icon not being what you want it to be, or something similar, make sure that your icon is the same across all drawable folders.
I'm running into this issue with my app icon, affectionately named ic_launcher.png. I have been testing my app on the Samsung Galaxy S4 [Sprint] [Stock] and the first icon showed up and everything was normal. I recently changed the app icon to something else, (with the same name, i just made a different icon for it) but the old icon just won't go away when I install the app on the s4. I have cleared data and cache and uninstalled several times, I have even changed the package name, I'm fairly certain this TouchWiz specific because I have CM10.1 on my SII and it updated the icon fine. Any suggestions on how to fix this?
Maybe you have the old icon in the drawable-xxhdpi folder? because s4 will get the launcher icon from this folder.