gpt4 book ai didi

安卓工作室 : “libpng warning: iCCP: Not recognizing known sRGB profile that has been edited”

转载 作者:太空宇宙 更新时间:2023-11-03 12:05:35 26 4
gpt4 key购买 nike

我从 :

升级了 gradle
dependencies {
classpath 'com.android.tools.build:gradle:1.3.1'
}

到:

dependencies {
classpath 'com.android.tools.build:gradle:1.4.0-beta3'
}

但我收到错误:

AAPT err(Facade for 1057495093): E:\android_studio_workspace\P2JN\p2jn\src\main\res\drawable-mdpi\reload_data.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
AAPT err(Facade for 1057495093): E:\android_studio_workspace\P2JN\p2jn\src\main\res\drawable\teamwork.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
AAPT err(Facade for 2049818754): E:\android_studio_workspace\P2JN\p2jn\src\main\res\drawable-hdpi\ic_action_update.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
AAPT err(Facade for 2049818754): E:\android_studio_workspace\P2JN\p2jn\src\main\res\drawable-ldpi\reload_data.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
AAPT err(Facade for 2049818754): E:\android_studio_workspace\P2JN\p2jn\src\main\res\drawable\get_started.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited

编辑 我的 gradle 项目上的 buildToolsVersion:

buildToolsVersion "23.0.1"

那么如何解决呢?

最佳答案

这是一个警告,你的 png 图像有一些无效的元数据。最简单有效的解决方案是使用 pngcrush 优化您的 png 图像。和 optipng公用事业。

运行

pngcrush -ow -rem allb -brute -reduce image.png

optipng -o7 image.png

在每个导致错误的图像上。

在 macOS 和 Linux 上,您可以使用 bash 脚本查找当前目录及其所有子目录中的所有 png 图像并优化它们:

#!/bin/sh

for i in `find . -name "*.png"`; do
pngcrush -ow -rem allb -brute -reduce $i
optipng -o7 $i
done

对于 Windows,将以下内容保存到批处理文件并运行:

@echo off
set /p UserInputPath= What Directory would you like?
cd %UserInputPath%
for /r %%i in (*.png) do ( pngcrush -ow -rem allb -brute -reduce "%%i" & optipng -o7 "%%i" )

要在 macOS 上安装 pngcrushoptipng 使用 Homebrew包管理器:

brew install pngcrush optipng

关于安卓工作室 : “libpng warning: iCCP: Not recognizing known sRGB profile that has been edited” ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32882958/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com