eclipse开发J2ME时,图片显示不出来,路径没问题
eclipse开发J2ME时,图片显示不出来,路径没问题
eclipse 3.2 eclipseme 1.6.6
程序如果不加入图一切正常 ,加入后报这个:
java.io.IOException: The input stream doesn 't contain an image.
at javax.microedition.lcdui.ImmutableImage.getImageFromStream(+108)
at javax.microedition.lcdui.ImmutableImage. <init> (+20)
at javax.microedition.lcdui.Image.createImage(+8)
at HelloWorld. <init> (+85)
at java.lang.Class.runCustomCode(+0)
at com.sun.midp.midlet.MIDletState.createMIDlet(+34)
at com.sun.midp.midlet.Scheduler.schedule(+52)
at com.sun.midp.main.Main.runLocalClass(+28)
at com.sun.midp.main.Main.main(+116)
应该是图片路径没问题,要不就报这个:
java.io.
IOException at javax.microedition.lcdui.ImmutableImage.getImageFromStream(+15)
at javax.microedition.lcdui.ImmutableImage. <init> (+20)
at javax.microedition.lcdui.Image.createImage(+8)
at HelloWorld. <init> (+85)
at java.lang.Class.runCustomCode(+0)
at com.sun.midp.midlet.MIDletState.createMIDlet(+34)
at com.sun.midp.midlet.Scheduler.schedule(+52)
at com.sun.midp.main.Main.runLocalClass(+28)
at com.sun.midp.main.Main.main(+116)
怎么回事,达人帮忙!
------解决方案--------------------记得资源修改后刷新下项目
------解决方案--------------------png图片后缀名小写的,不会是大写的PNG吧!那可不行!