Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: [aapt] nothing matches overlay file - during ant build

Tags:

java

android

I am building my app with the ant build script. The build shows successful, but I see lot's of the following messages about several of png files in res\drawable-xxxx folders. Here is an example of one of them:

[aapt] nothing matches overlay file ic_launcher.png, for flavor ,,,,,,,,,,,hdpi,,,,,,,

What does it mean? Does the resulting .apk file has problems? Is it just a warning?

like image 969
Genry Avatar asked Dec 11 '25 22:12

Genry


2 Answers

In my case, I had the resource in all three resolutions, but it seems by coincidence a resource with the same name (in only one drawable resolution) existed in a dependent (library) project I was using...

like image 71
Andrew Mackenzie Avatar answered Dec 14 '25 11:12

Andrew Mackenzie


This means that ic_launcher.png exists in some (but not all) of your drawable resource folders. So maybe you have a default resolution PNG, but not for LDPI or HDPI (which is what this message reads like).

What happens is Android will scale whatever PNG is available for the DPI of the target device, but it will look scaled. It will work, though. For better results, you can provide separate high/medium/low DPI versions of your image assets.

For more information, see: http://developer.android.com/guide/practices/screens_support.html

like image 28
Bryan Lin Avatar answered Dec 14 '25 11:12

Bryan Lin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!