libpng 警告:iCCP:无法识别已编辑的已知 sRGB 配置文件 [英] libpng warning: iCCP: Not recognizing known sRGB profile that has been edited

查看:38
本文介绍了libpng 警告:iCCP:无法识别已编辑的已知 sRGB 配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试更改 Titanium android 应用程序中 TextField 中光标的颜色.为此,我创建了 platform/android/res/values/ 文件夹.

I am trying to change the color of the cursor in TextField in Titanium android app. For that I created platform/android/res/values/ folder.

我在 tiapp.xml 中放置了以下代码:

I placed the following code in tiapp.xml:

<android xmlns:android="http://schemas.android.com/apk/res/android">
  <manifest>
    <application android:theme="@style/Theme.Titanium">
    </application>
    <uses-sdk android:minSdkVersion="22" android:targetSdkVersion="22"/>
  </manifest>
</android>

当我尝试运行该应用程序时,出现以下错误.我正在研究 3.4.1.API 级别仅为 22.

When I am trying to run the app, getting the following error. I am working on 3.4.1. API Level is 22 only.

[ERROR] :  Failed to package application:
[ERROR] :  
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-mdpi/abc_ab_share_pack_holo_dark.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-hdpi/abc_ab_share_pack_holo_dark.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-xhdpi/abc_ab_share_pack_holo_dark.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-hdpi/abc_ab_share_pack_holo_light.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-xhdpi/abc_ab_share_pack_holo_light.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-mdpi/abc_ic_clear_disabled.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-hdpi/abc_ic_clear_disabled.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-xhdpi/abc_ic_clear_disabled.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-xxhdpi/abc_ic_clear_disabled.png: libpng warning: iCCP: profile 'icc': 'GRAY': Gray color space not permitted on RGB PNG
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-hdpi/abc_ic_clear_normal.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-xxhdpi/abc_ic_clear_normal.png: libpng warning: iCCP: profile 'icc': 'GRAY': Gray color space not permitted on RGB PNG
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-mdpi/abc_ic_go.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-hdpi/abc_ic_go.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-xhdpi/abc_ic_go.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-xxhdpi/abc_ic_go.png: libpng warning: iCCP: profile 'icc': 'GRAY': Gray color space not permitted on RGB PNG
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-mdpi/abc_ic_search.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-hdpi/abc_ic_search.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-xhdpi/abc_ic_search.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-xxhdpi/abc_ic_search.png: libpng warning: iCCP: profile 'icc': 'GRAY': Gray color space not permitted on RGB PNG
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-mdpi/abc_ic_voice_search.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-hdpi/abc_ic_voice_search.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-xhdpi/abc_ic_voice_search.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-xxhdpi/abc_ic_voice_search.png: libpng warning: iCCP: profile 'icc': 'GRAY': Gray color space not permitted on RGB PNG
[ERROR] :  /Users/murali/Documents/Titanium_Studio_Workspace/textboxapp/build/android/res/values/styles.xml:3: error: A 'type' attribute is required for <item>
[ERROR] Application Installer abnormal process termination. Process exit value was 1.

推荐答案

正如警告所说,您有一堆带有无效颜色配置文件的 PNG 文件.Libpng16 发出有关它们的警告.您的应用程序将警告视为错误.

As the warnings say, you have a bunch of PNG files with invalid color profiles. Libpng16 issues warnings about them. Your application treats warnings as errors.

要解决此问题,您可以执行以下一项或多项操作:

To work around this, you can do one or more of the following:

  • 使用 PNG 编辑器从列出的 PNG 文件中删除 iCCP 块在错误报告中,例如,使用 ImageMagick 的convert -definepng:exclude-chunk=iCCP,zCCP"

  • Use a PNG editor to remove the iCCP chunk from the PNG files listed in the error report, e.g., with ImageMagick's "convert -define png:exclude-chunk=iCCP,zCCP"

使用 PNG 编辑器删除所有辅助块,例如 convert -strip

Use a PNG editor to remove all ancillary chunks, e.g., convert -strip

将您的 libpng 降级到 1.5.x 版(当前为 libpng-1.5.23)

Downgrade your libpng to version 1.5.x (currently libpng-1.5.23)

使用-DPNG_sRGB_PROFILE_CHECKS=-1"重新安装 libpng-1.6.x(当前为 libpng-1.6.17)

Reinstall libpng-1.6.x (currently libpng-1.6.17) with "-DPNG_sRGB_PROFILE_CHECKS=-1"

找出是否有办法让您的应用程序将警告视为警告而不是错误,然后这样做.

Find out if there is a way to have your application treat warnings as warnings, not errors, and do that.

这篇关于libpng 警告:iCCP:无法识别已编辑的已知 sRGB 配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆