错误读取在Eclipse PNG元的Andr​​oid UI设计师 [英] Error reading PNG metadata Android UI designer within Eclipse

查看:188
本文介绍了错误读取在Eclipse PNG元的Andr​​oid UI设计师的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了Android插件在我的Eclipse环境来设计布局。

I'm using the Android plug-in in my Eclipse environment to design layouts.

我有各种不同位置的PNG文件。 <青霉>一些的这些PNG文件的不能由插件进行渲染尽管它们可在图像编辑器被打开,并在应用程序本身完全出现。

I have a variety of PNG files in different locations. Some of these PNG files cannot be rendered by the plug-in although they can be opened in image editors and appear perfectly in the application itself.

在插件显示的错误取决于所选择的Andr​​oid版本。对于> = 3.0,我看到:

The error displayed on the plug-in depends on the Android version chosen. For >= 3.0, I see:

无法负荷大量
  MyProjDir \\水库\\绘\\ roll.png

Failed lot load MyProjDir\res\drawable\roll.png

针对Android&LT; 3.0,我看到:

for Android <3.0, I see:

无法解析绘>MyProjDir \\水库\\绘\\ roll.png属性中的SRC

Unable to resolve drawable >"MyProjDir\res\drawable\roll.png" in attribute "src"

不管怎样,错误日志显示:

Either way, the error log shows:

javax.imageio.IIOException:错误读取PNG元
    在com.sun.imageio.plugins.png.PNGImageReader.readMetadata(来源不明)
    在com.sun.imageio.plugins.png.PNGImageReader.readImage(来源不明)
    在com.sun.imageio.plugins.png.PNGImageReader.read(来源不明)
    在javax.imageio.ImageIO.read(来源不明)
  ...更多条目...

javax.imageio.IIOException: Error reading PNG metadata at com.sun.imageio.plugins.png.PNGImageReader.readMetadata(Unknown Source) at com.sun.imageio.plugins.png.PNGImageReader.readImage(Unknown Source) at com.sun.imageio.plugins.png.PNGImageReader.read(Unknown Source) at javax.imageio.ImageIO.read(Unknown Source) ... many more entries ...

这样看来,将PNG的这一问题有一定的元数据(或缺乏某些元数据),引起的问题。

It would appear that the PNG's with the problem have some metadata (or lack some metadata), causing the issue.

一种可能性,就是PNG的使用一些其他的编辑器来保存。我使用GIMP,我尝试了Windows 7的画图无济于事。

One possibility, is to save the PNG's using some other editor. I'm using GIMP, and I've tried Windows 7's Paint to no avail.

有什么建议?

推荐答案

尝试切换到不同的Java SDK。我得到同样的错误读取PNG元数据使用的Sun Java 5的时候,虽然同样的事情与OpenJDK的或的Sun Java 6的工作错误。

Try switching to a different Java SDK. I get that same "Error reading PNG metadata" error when using Sun Java 5 though the same exact thing works with OpenJDK or Sun Java 6.

这篇关于错误读取在Eclipse PNG元的Andr​​oid UI设计师的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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