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

前端 未结 15 879
清歌不尽
清歌不尽 2020-12-22 21:03

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 ima

15条回答
  •  庸人自扰
    2020-12-22 21:14

    the answers above were confusing to me. Here is what i did:

    • File ->new Image Asset
    • the first field "Asset type" must be launcher icons. browse to the file you want as icon, select it and android studio will show you in the same window what it will look like under different resolutions.

    • choose a different name for it, click next. Now the icon set for all those hdpi, xhdpi, mdpi will be in corresponding mipmap folders

    • finally, most importantly go to your manifest file and change "android:icon" to the name of your new icon image.

提交回复
热议问题