是解码图片报错。换成这种方式解决
URL imageurl = new URL(String url); IputStream stream = imageurl.openStream(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); byte[] b = new byte[1024]; int len = 0; while ((len = is.read(b, 0, 1024)) != -1) { baos.write(b, 0, len); baos.flush(); } byte[] bytes = baos.toByteArray(); Bitmap orginImage=BitmapFactory.decodeByteArray(bytes,0.bytes.length);