1

I see a lot of warnings related to aapt and images during the build of my project.

AAPT err(26532284): /path_to file/ic_status_background.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited

I saw this question Android Gradle Project upgrading build tools to 21.0.1: aapt throws Exception. It looks that this issue related to several last build tool versions. There are suggestion to use the latest build-tools version. But it doesn't help. And comments with "Still happening in ..." only proves it. Also answers on this page doesn't cover what actions can be done on the graphic preparation stage for preventiong this issue.

So my questions are:

  1. Should I care about this warnings?
  2. How may this warning affect on my application?
  3. Is it safe to mute this warning (without changing png-files)? How?

And the most important question
4. I prepare my *.png files in Photoshop. What can I do (or change in PS settings) for preventing this issue on image preparation stage?

Community
  • 1
  • 1
Ilya Tretyakov
  • 6,848
  • 3
  • 28
  • 45

1 Answers1

0

It is just a libpng warning, since your pngs contain metadata that is not standard/expected.

As we can see in this Android issue, they upgraded libpng used in aapt and now is more picky about that non-standad extra data.

  1. Should you care?

No. They are just warnings

  1. How may this affect your application?

It won't. It's just extra metadata.

  1. Is it safe to mute this warning?

Yes. Actually, newer versions of aapt spit fewer of these warnings, as reported by users in the issue linked above.

  1. What can you do?

I haven't found an easy way of prevent Photoshop from writint that iCC profile. However, in the same issue they point out a shell command that does that for you. It requires you to have Imagemagick installed tho.

find <path to res folder> -name *.png -exec mogrify +profile sRGB {} \;