This assumes you already have the icon asset and would like to import that you into your app using Android Studio.
The following example is based on the new project template from Android Studio.
1. Delete all existing icon assets in Android Studio
drawablefolder. This is just an example, you could be any icon asset file format.
- Delete all
mipmapfolders which consists of all the icon assets
Tip: This step seems necessary. If I don't clean them up first, Android Studio doesn't seem to generate and overrites the icon assets correctly. It is less messy in my opinion. You don't have mixed new and old icon assets.
2. Copy your new icon asset into the
Tip: This step is optional since the actual icon assets are generated later. However, I prefer to copy the icon asset file into the
drawablefolder so that we can keep a copy of it.
3. Generate launcher icon from image asset
- Right-click in the project window, go to New->Image Asset
- Make sure the icon type is Launcher Icons (which is the default)
- In source asset, select Image asset type. Browse to the icon asset in the
drawablefolder just now.
- Go to Background Layer, change the Source Asset Type Color to white color (i.e. FFFFFF)
- Click Next->Finish. Different screen resolution icon assets are now generated in the
Run the app, and you should see your new icon!