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

后端 未结 6 505
执笔经年
执笔经年 2020-12-01 10:44

I spent some hours trying to solve this:

app:mergeDebugResources AAPT err(927129865): C:\\Users\\Will\\AndroidStudioProjects\\Splitter2\\app\\build\\i

相关标签:
6条回答
  • 2020-12-01 10:54

    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

    0 讨论(0)
  • 2020-12-01 10:57

    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.

    0 讨论(0)
  • 2020-12-01 10:57

    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.

    0 讨论(0)
  • 2020-12-01 11:02

    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

    0 讨论(0)
  • 2020-12-01 11:08

    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.

    0 讨论(0)
  • 2020-12-01 11:13

    Add this in your build.gradle for your module

    aaptOptions { cruncherEnabled = false }

    this will resolve the issue/error

    0 讨论(0)
提交回复
热议问题