Jonik Jonik - 1 year ago 61
Android Question

Notification icon missing with ProGuard enabled

After enabling ProGuard, our push notification icon (

) has gone missing (only an empty circle, whose colour is
, is shown).

The icon is only referred to from Urban Airship config file (

notificationIcon = ic_notifications
notificationAccentColor = #0000CC

I suspect ProGuard thinks the icon is unused, and removes it. Any way to tell ProGuard to keep it?

Answer Source

ProGuard does not remove resources. I suspect you use the shrinkResources feature of the Android gradle plugin? Take a look at the following page that describes how to keep certain resources from being shrunk: (section Customize which resources to keep).