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

前端 未结 15 863
清歌不尽
清歌不尽 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:35

    Put the desired launcher image (.png) in drawable folder.

    In AndroidManifest.xml, add

    android:icon="@drawable/your_img_name"
    

    under application tag.

    0 讨论(0)
  • 2020-12-22 21:39

    Click "File > New > Image Asset"

    Asset Type -> Choose -> Image

    Browse your image

    Set the other properties

    Press Next

    You will see the 4 different pixel-sizes of your images for use as a launcher-icon

    Press Finish !

    0 讨论(0)
  • 2020-12-22 21:41

    You can create an icon using this website https://romannurik.github.io/AndroidAssetStudio/index.html.

    Download the icon, go to File Explorer - where your projects are saved, the default path is C:\Users\Your Name\AndroidStudioProjects\Project Name\app\src\main\res\

    and copy the folders you downloaded to the res folder.

    0 讨论(0)
提交回复
热议问题