How to force an app icon on Android O? (Prevent th

2019-01-11 20:42发布

问题:

This is my first question on StackOverflow, so please bear with me if I fail to articulate my question.

I am working on an Android app that targets Android O, and I want the launcher to NOT show the icon adapted i.e. remove the white background. I tried to use adaptive icons and they work, but the problem is that they change the icon itself making it rouned, square, squircle and tear-shaped.

At first I thought it's out of my hands, but some other apps (facebook, whatsapp and snapchat for example) have their icons unchanged.

tl;dr: How can I force an icon to be used by the launcher on Android O?

回答1:

The other apps you mention (Facebook, Whatsapp, and Snapchat) don't yet target Android O. Once they do, they'll also be forced to have an adaptive icon as well.



回答2:

Just remove the targetSdkVersion property from your app level build.gradle file. It will work.