Android change application icon

I cannot understand how to change the application icon that appears when installing the application on the screen that you have to click.

What I've done:

  • I created a new icon -> new> image object (mipmap)
  • I removed ic_launcher (default)
  • I named the new asset as the old icon (ic_launcher)
  • Rebuild
  • Clear project
  • Invalid cache and restart
  • Installed Application

nothing. I still have an application with the annoying mipmap icon mcmap ic_launcher.

I really don't know what to do more than that.

Can anybody help me?

EDIT: Sorry, I forgot the manifest.

<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" > ... ... </application> 
+3
source share
10 answers

As Suke pointed out, I forgot to post a solution to this issue. Sorry, everyone.

After many controls, the solution was simple, and it was one of Google.

This link is where you can create all the images for the Android project.

Go there and:

  • insert your image and select all functions
  • download
  • Replace all image formats (xxhdpi, hdpi, ...) in your drawable-xxhdpi, drawable xhdpi, ... and mipmap-xxhdpi, mipmap-xhdpi, .... folders
  • in the manifest set android:icon = "@drawable/myicon"

this is how i did it

Hope help

+5
source

You indicate your application icon under the <application> in the manifest:

 <application android:icon="@drawable/myIcon" > </application> 

Then just make sure you have a file (e.g. myIcon.png ) in the resources folder (hdpi, xhdpi, etc.)

+1
source

use this side to create an icon by uploading an image (use the image button)

https://romannurik.imtqy.com/AndroidAssetStudio/icons-launcher.html#foreground.space.trim=1&foreground.space.pad=0&foreColor=607d8b%2C0&crop=0&backgroundShape=square&backColor=ffffff%2Cone&effects

and then download and save this in the dropdown folder of your application, and then use

  <application android:icon="@drawable/myIcon" > </application> 

in the manifest file.

+1
source

https://romannurik.imtqy.com/AndroidAssetStudio/icons-launcher.html#foreground.space.trim=1&foreground.space.pad=0&foreColor=607d8b%2C0&crop=0&backgroundShape=square&backColor=ffffff%2Cone&effects

After creating the icon and loading the zip file using the above side, extract the res folder from the zip file and overwrite the res folder (by pasting in the location, for example C: \ MyApplicaton \ app \ src \ main) of your application with this res folder, then your code

 android:icon="@mipmap/ic_launcher" 

will work.
Note: overwriting the res folder, it only adds or overwrites the mipmap folders, and the old folder will remain the same.

OR

you need to replace the ic_launcher icon in all mipmap folders with the new ic_launcher according to the icon size using the above side.

then he will work

folder name e.g.

mipmap-HDI

mipmap-mdpi

mipmap-xhdpi

mipmap-xxhdpi

Then your code below will work

  <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" > ... ... </application> 
+1
source

In the manifest, add android: icon = "@ drawable / Icon" in

<application android:icon="@drawable/Icon" > </application>

make sure the icon is present in the folder

+1
source

If you did not delete the application with the old icon and did not update it, there is a possibility that it may display the old icon due to the cache. Forced termination of the application may help.

0
source

first insert the icon.png file into the folder with the ability to transfer and change your code below

  <application android:allowBackup="true" android:icon="@mipmap/icon" android:label="@string/app_name" android:supportsRtl="true" > </application> 
0
source

Also be sure to update android:roundIcon="@mipmap/ic_launcher_round" new value, this is valid for newer versions of android.

0
source

If you still see the default Android icon, this is easy to fix ... You can use these tools to create an icon of all sizes. https://appicon.co/ Unzip the mipmap resized file in the app res folder. Then, in the / mipmap-anydpi-v26 / folder, delete both XML files.

Now in the manifest, in <application> , set your icon for android:icon & android:roundIcon .

0
source

As others have already noted, I created an icon with this link . In my case, I had to configure both of the following parameters to the icon name that I added to res.

 <application android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher"> </application> 
0
source

All Articles