Java代码 ByteArrayInputStreamis=newByteArrayInputStream(byte[]); BitmapFactory.Optionsoptions=newBitmapFactory.Options(); options.inPurgeable=true; options.inInputShareable=true; options.inSampleSize=2; try{ BitmapFactory.Options.class.getField("inNativeAlloc").setBoolean(options,true); }catch(Exceptionex){ ex.printStackTrace(); } BitmapimgBit=(newWeakReference<Bitmap>(BitmapFactory.decodeStream(is,null,options))).get();