How to Solve Android App Icon Showing Default in Oreo (API 26) and above

Problem: Android App Icon is not using your generated PNG images in Oreo, Pie and above

Explanation:

Using Android Studio, the IDE by default generated the use of adaptive icons in a new project. However, adaptive icons will only work for API 26 and above. So your app may be showing your generated icons blissfully until you tested on Oreo or Pie, where it seems to be defaulted back to the standard icon.

Standard Launcher Icon
Standard Launcher Icon

Standard Round Launcher Icon
Standard Round Launcher Icon

To solve the problem, you just have to delete the adaptive icons from the folder mipmap-anydpi-v26 and mipmap-anydpi by deleting the two folders.

This is because if a resource is found in mipmap-anydpi-v26, it will always take precedence if API level is 26 or more (Oreo). The next precedence is mipmap-anydpi.

So if you are not using adaptive icons, just do the above and your generated PNG icon images will be showing in Oreo onward.


No comments:

Post a Comment