3

Just updated my android studio to 3.5 tried to import an image using asset studio.

Selected-

icon type : Launcher icons (Legacy only)

name : test_icon

asset type: image

path: path of image having transparent background

trim : no

background : #ffffff

scaling : crop

Shape : None (this is the problem ,it is supposed to show the transparent background image as it is but it still adding white background)

Effect : None

How can this be done?

ChrisM
  • 505
  • 6
  • 18

3 Answers3

1

I actually faced this problem too, so I filed a report and they answered that this is not a bug and it's intentional. check out the issue here:

https://issuetracker.google.com/issues/140183584

ShahabGT
  • 148
  • 6
0

problem was with the android studio 3.5

just changed installed another version of android studio 3.4 and used the image asset creator of that one to create the application icon.

you don't have to uninstall android studio 3.5 just install 3.4 to use it for creating application icons

alireza easazade
  • 3,324
  • 4
  • 27
  • 35
0

To solve this problem without updating Android Studio:

  1. You must copy ic_launcher_background.xml from drawable resource folder with a desired name such as ic_launcher_background_transparent.xml to a folder in your computer.
  2. Open ic_launcher_background_transparent.xml in edit mode and add android:tint="@android:color/transparent" in the vector tag.

    <?xml version="1.0" encoding="utf-8"?>
    <vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="108dp"
        android:height="108dp"
        android:viewportWidth="108"
        android:viewportHeight="108"
        android:tint="@android:color/transparent">
    
  3. Then, right-click in project and go to New > Image Asset and select icon type as Launcher Icons (Adaptive and Legacy) and in the Background Layer Tab select the ic_launcher_background_transparent.xml file as path.

RobC
  • 22,977
  • 20
  • 73
  • 80
Abbas m
  • 56
  • 3
  • Thank you so much for replying I think you got the question wrong. i don't want to create ic_launcher app logo icon i just want to import a normal image with transparent background to be used inside the app using Launcher icon (Legacy only) – rajesh vaishnav Oct 20 '19 at 16:36
  • I got your question. In android studio 3.5 you can not import image with transparent bg by Launcher icon section, but you can use of my solution and test it. – Abbas m Oct 20 '19 at 17:09