After many Android app versions with perfectly-good icons, it came time to replace them: new launcher icons, new store listing graphic, new action bar icons, and in some cases, removing the icon from the action bar altogether.
For the latter, I preferred an easily-customized manifest entry:
android:icon=”@color/transparent”
This worked nicely for local and ad-hoc installs. So I was surprised when publishing to the Google Play store failed with the obscure yet common error:
Your APK cannot be analyzed using ‘aapt dump badging’. Error output:
Failed to run aapt dump badging: Error getting ‘android:icon’ attribute: attribute is not a string value
You wouldn’t know it from the message nor from any online suggestions, but that @color/transparent trick was the root cause. So instead I created a 1×1 transparent PNG (ic_empty.png) and used it instead:
android:icon=”@drawable/ic_empty”
BTW, when it’s “icon update” time, I’ve found the quickest way to get scaled icons is to create the 512×512 web version, and point the New Android Application wizard at it. It’ll create the mdpi, hdpi, xdpi, and xxhdpi sizes for you.