错误的libpng在:应用:mergeDebugResources - 摇篮错误42 [英] Libpng error at :app:mergeDebugResources - Gradle Error 42

查看:355
本文介绍了错误的libpng在:应用:mergeDebugResources - 摇篮错误42的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我编译调试应用Android Studio中,我得到以下错误(S):

When compiling my app for debug in Android Studio, I get the following error(s):

Failed to run command:
C:\Users\Farbod\Android-SDK\build-tools\21.1.2\aapt.exe s -i C:\Users\Farbod\AndroidStudioProjects\MyApp\app\src\main\res\drawable-hdpi\img_myImage.png -o C:\Users\Me\AndroidStudioProjects\MyApp\app\build\intermediates\res\debug\drawable-hdpi-v4\img_myImage.png
Error Code:
42
Output:
C:\Users\Me\AndroidStudioProjects\MyApp\app\src\main\res\drawable-hdpi\img_myImage.png: libpng warning: IDAT: Too many IDATs found
libpng error: Read Error
:app:mergeDebugResrouces FAILED

我检查,我的所有文件都在巴纽格式,我不知道什么可能是错误的。

I've checked that all my files are in a .png format, and I'm not sure what could be wrong.

推荐答案

我试过在Adobe Fireworks中打开我的文件( img_myImage.png ),这将无法打开该文件,所以我在Photoshop中打开它其中的没有的工作,然后我重新保存它作为一个巴纽文件,这似乎解决了这个问题。

SOLUTION

I tried opening my file (img_myImage.png) in Adobe Fireworks, which wouldn't open the file, so I opened it in Photoshop which did work, and then I re-saved it as a .png file, which seemed to solve the issue.

这篇关于错误的libpng在:应用:mergeDebugResources - 摇篮错误42的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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