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

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

    When making an Android app in eclipse, just right-click on the res folder, click New -> Other, and select Android Icon Set under Android.

    This allows you to make more icons (or replace any existing ones) easily.

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

    In Android studio 0.8 and after Right click on app folder then New > Image Asset

    Browse for best resolution image you have in "Image file" field

    hit Next The rest will be generated

    0 讨论(0)
  • 2020-12-22 21:29
    1. File >In androidStudio Open your application(your project)

    2. Go to res folder and then right click on that folder select the new tab in that go to image asset tab you will get asset studio display page .

    3. Browse(select) the icon that you want get as app icon(no need to change the drawble folder) .

    4. And then click next tab and finish.

    5. your new icon will displayed in the app.
    0 讨论(0)
  • 2020-12-22 21:33

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

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

    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

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

    This is how I solved by creating an ic_launcher from a PNG image.

    1. I converted a PNG image into SVG image by using this website https://image.online-convert.com/convert-to-svg.

    2. I used the converted SVG image and converted it into a Vector Asset in Android Studio by, File > New > Vector Asset. This converted the SVG image into an XML file.

    3. I created the ic_launcher image by creating a new Image Asset in Android Studio by, File > New > Image Asset. This created an ic_launcher in a square, round and an Adaptive icon from the XML file.

    Note: At the time of writing I faced issues with the SVG image exported from Adobe XD. So I had to use the online converter. Adobe XD does not have xml export feature.

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