Will
Will

Reputation: 824

Android Studio: "libpng warning: iCCP: Not recognizing known sRGB profile that has been edited"

I spent some hours trying to solve this:

app:mergeDebugResources AAPT err(927129865): C:\Users\Will\AndroidStudioProjects\Splitter2\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\22.0.0\res\drawable-hdpi-v4\abc_spinner_mtrl_am_alpha.9.png:

libpng warning: iCCP: Not recognizing known sRGB profile that has been edited

My project is finally running but every time I make a clean built it shows this warning again.

I updated my buildToolsVersion to "22.0.1" and I am using tools.build:gradle "1.2.3". I'm still getting this error.

Everything started when I tried to use FancyButton.

Someone knows how to solve this problem?

Upvotes: 37

Views: 54580

Answers (6)

Xaju
Xaju

Reputation: 37

For me the problem was the link cable. The connection seemed to be unstable and therefore the error occured. I cahnged the cable and now it works without a problem.

Upvotes: 0

shaiban
shaiban

Reputation: 341

Add this in your build.gradle for your module

aaptOptions { cruncherEnabled = false }

this will resolve the issue/error

Upvotes: 5

Silwester
Silwester

Reputation: 418

I tried to fix the problem and get these annoying warnings disappeared. What really helped me: delete meta data from your png file (I guess you don't need it).

brew install exiftool
find . -path '*src/main/res/*' -name '*.png' -exec exiftool -overwrite_original -all= {} \;

See details in Jake Wharton's answer https://groups.google.com/forum/#!msg/adt-dev/rjTQ_STR3OE/-UcNQRISTKsJ

Upvotes: 6

Mr.Moustard
Mr.Moustard

Reputation: 1307

It happens to me since buildToolsVersion 23.0.1. I don't know the reasson yet, but if you use ImageOptim (for MAC) with those image files, you'll get rid of that error, it removes junk metadata and unnecessary color profiles.

I hope it helps.

Upvotes: 10

Rahul Vats
Rahul Vats

Reputation: 287

I had same issue with below heading: C:\Users\Administrator\workspace\pickpacksas\platforms\android\res\drawable-hdpi \icon.png: libpng warning: iCCP: Not recognizing known sRGB profile that has bee n edited

The error is due to the image size is not as per android guidelines. Check once your icon or splash screen size(height and width) and make them as per android guidelines.

Upvotes: -3

Glenn Randers-Pehrson
Glenn Randers-Pehrson

Reputation: 12465

It's just a warning, which libpng started issuing at version 1.6.0, so you can ignore it.

To get rid of the warning, you need to fix the PNG file that's named in the warning. You can use any one of a number of PNG image editors (ImageMagick, GraphicsMagick, etc.) to remove the offending iCCP chunk. Or you can downgrade your libpng to version 1.5.x.

See the similar question libpng warning: iCCP: known incorrect sRGB profile

Upvotes: 31

Related Questions