libpng error: Not a PNG file

来源:互联网 发布:淘宝电子邮箱注册 编辑:程序博客网 时间:2024/05/18 01:50

在将eclipse的android项目迁移到android studio的时候,编译项目出现以下错误:

Error:Execution failed for task ':mergeDebugResources'.

> Error: Failed to run command:
D:\android_stutio\sdk\sdk\build-tools\22.0.1\aapt.exe s -i D:\android_stutio\workspace\jfpal_v3\res\drawable-hdpi\ic_launcher.png -o D:\android_stutio\workspace\jfpal_v3\build\intermediates\res\debug\drawable-hdpi-v4\ic_launcher.png
Error Code:
42
Output:

libpng error: Not a PNG file

错误描述为指定的文件不是png格式。看了下我图片的格式后缀是.png的,应该是没有问题啊,结果不是的。。。这张图原本是jpg的,我只是将他的后缀jpg改为了png。这样是不行的必须使用图片的格式装换工具将它转换成png。

0 0