问题如下;
java.lang.ExceptionInInitializerError
Caused by: java.lang.IllegalArgumentException: input == null!
at javax.imageio.ImageIO.read(ImageIO.java:1388)
at com.pleanwar.fiying.FlyingObject.loadImage(FlyingObject.java:52)
at com.pleanwar.hero.HeroAirPlean.<clinit>(HeroAirPlean.java:22)
Exception in thread "main"
查看:
public static BufferedImage read(URL input) throws IOException {
if (input == null) {
throw new IllegalArgumentException("input == null!");
}
总结为:图片无法加载异常!
问题所在可能清况
1.仔细查找项目代码,发现在导入图片输入图片路径时,将后缀为jpg的图片输错成PNG
2.路径问题
3.当你图片所在位置之中有==相识==照片名
提醒:
遇到问题不要慌,同样也是写给我的。