You might be thinking this question is a duplicate of this one. But since then, Android Studio has been updated and the solution given there is not working anymore.
I am trying to set my app logo using image asset in android studio. This is because if I put my app logo directly in drawable or mipmap, then it causes many problems like: If it's size is big then app crash occurs, if device running on oreo then logo will not showed and default ic_launcher is showing etc.
While trying to set my app's logo using image asset, I am facing a problem: I can't keep app logo's background transparent.
I have a png logo made in photoshop and I want to set this as my app logo and I don't want any background but android studio image asset doesn't provide any option to remove background. I tried following solutions from google:
but none of these worked for me.
Tried solutions:
- By setting shape to none
- by Deleting ic_launcher_background file from it's default location
- Tried in different devices
None of these works...please help me. Any help will be appreciated.

Android 8.0 Oreo (API level 26) introduced adaptive launcher icons, which consist of two layers: a foreground and a background. The material design guidelines state that the background layer must be opaque in Android O and beyond, as you can see at the bottom of the following citation. So, the adaptive launcher icon for Android 8.0 or higher must have opaque background color at least, if targetSdkVersion of your app is 26 or higher.
https://material.io/guidelines/style/icons.html#icons-icons-for-android
Workaround for 7.1 or lower
Although launcher icons for 8.0 or higher must have opaque background color, the other legacy launcher icons for 7.1 or lower can revert to transparent background color, if you can omit round launcher icons from your app.
shapetonone, they will have transparent background color.res/mipmap/ic_laucher_roundin the project window.android:roundIcon="@mipmap/ic_launcher_round"from theapplicationelement.In the left-side pane above, the following XML files define adaptive launcher icons for Android 8.0 or higher.
As seen in the right-side pane, they refer to the following drawable XML files.
Update #1:
In Android 8.0 or higher, the background color of launcher icons can be transparent, as shown in the Android 8.1 (Nexus 5X) screenshots. The sample app "NoAdaptive" is without any resource for the adaptive launcher icons in folder
mipmap-anydpi-v26, and the other app "Adaptive" has the resource.Update #2:
Although the background color of launcher icon can be transparent in Android 8.0 or higher, it depends on user’s launcher app. Some launcher apps will convert your legacy icon to opaque adaptive icon.
In Nexus 5X device (Android 8.1)
The default launcher app is Google Now Launcher, according to its package name
com.google.android.launcher. The background color can be transparent, as in the screenshots of Update #1.In Nexus 5 emulator (Android 8.1)
The default launcher app is Pixel Launcher, according to its package name
com.google.android.apps.nexuslauncher. The background color can be transparent in Recents screen, as in the screenshots below:Opaque white background in some launcher apps
These GMS apps are closed-source:
com.google.android.launcherGoogle Now Launchercom.google.android.apps.nexuslauncherPixel LauncherIn contrast, AOSP apps are open-source. Most launcher apps in Android are based on the source code of the following launcher apps:
com.android.launchercom.android.launcher2com.android.launcher3Launcher3 source code
In the git branch oreo-release of Launcher3, LauncherIcons.java has the method
wrapToAdaptiveIconDrawablethat wraps legacy launcher icon in adaptive launcher icon.The flag
FeatureFlags.LEGACY_ICON_TREATMENTis defined in FeatureFlags.java:So, the background color of legacy launcher icon depends on this flag, and it can be opaque in some launcher apps such as Pixel Launcher.
The background color
If the flag is set to
true, a new adaptive launcher icon is created withR.drawable.adaptive_icon_drawable_wrapper, and the existing legacy icon becomes its foreground layer. The background layer is a drawable:@color/legacy_icon_background, according to the resource XML file:The color
legacy_icon_backgroundis defined in colors.xmlSo, the background color becomes white.