android studio 3.5 image asset launcher icon (legacy only) shape none not working

3k Views Asked by At

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?

3

There are 3 best solutions below

1
alireza easazade On

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

2
ShahabGT On

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

2
Abbas m On

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.