Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android change app icon [duplicate]

I can't really figure out how to change the app's icon that appears when you install the app, the one on the screen that you have to click.

What i did:

  • I created a new icon --> new > Image asset (mipmap)
  • I deleted ic_launcher (the default one)
  • I named the new asset like the old icon (ic_launcher)
  • Rebuild
  • Clean project
  • Invalidate cache and restart
  • Installed app

nothing. I still have my app with the annoying default mipmap ic_launcher icon.

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

Can anyone 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>
like image 219
Pier Giorgio Misley Avatar asked Nov 23 '15 16:11

Pier Giorgio Misley


2 Answers

As Suke pointed I forgot posting the solution for this question. Sorry all.

After a lot of managements the solution was easy and it was the one google's one.

this link is where you can create all images for android project.

Go there and:

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

this is how I did it

hope it helps

like image 156
Pier Giorgio Misley Avatar answered Oct 18 '22 21:10

Pier Giorgio Misley


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

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

and then download and save this in drawable folder of your app and then use

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

in manifests file.

like image 25
Muhammad Kashif Arif Avatar answered Oct 18 '22 21:10

Muhammad Kashif Arif