Rebuild or regenerate 'ic_launcher.png' from images in Android Studio

When one first creates a new project, that dialog lets you point to some external .PNG file, and then when that dialog completes, it generates 4 different pixel-sizes of images for use as a launcher-icon.

My question is: So, if one already has an existing project created, is there someplace to tell the Studio to re-generate 4 NEW such files, by just re-pointing it elsewhere, to some other .PNG?

It occurred to me that I could start a new project and then manually copy all the other files developed so far, such as the .JAVA and .XML files, etc, but that seems like a lot of work (that I hope won't be necessary).


For Android Studio 0.4.0 and later, click "File > New > Image Asset".


No, but you can do this almost as easily.

Go here:

https://romannurik.github.io/AndroidAssetStudio/

Build your icons using that page, and then download the zip package. Unzip it into the right directory and it'll overwrite all the drawable-*/ic_launcher.png correctly.


Just in case anyone else visits this post I thought I'd describe what I did.

  1. Right click on res folder > New image asset

  2. browser to the icon. Click next

  3. By default the icon goes to src/debug/res- keep this

  4. In the project hierarchy, browse to src/debug/res and copy the files from the drawable* directories to the same directories in src/main and src/main

  5. copy the src/debug/res/icon_name.png to the src/main and src/release directories


I can confirm that in Android Studio 1.x (here AS) on Windows also the right sequence is:

  • File -> New
  • AS opens a list where you must click on Image Asset
  • AS opens a dialog where the app\src\main\res Directory Structure is automatically selected (the right choice)
  • Clicking on the OK button, AS opens the Asset Studio dialog where you can find all the tools and options we had on the past Eclipse ADT

This can be done absolutely in any moments after creation of the project.

Android Studio warns you that it will overwrite the current ic_launcer, but this is exactly what we expect to do.