OutOfMemoryError:位图大小超过VM预算:-Android
out of memory error : bitmap size exceeds VM budget
HttpClient httpclient= new DefaultHttpClient();HttpResponse response=(HttpResponse)httpclient.execute(httpRequest); HttpEntity entity= response.getEntity();BufferedHttpEntity bufHttpEntity=new BufferedHttpEntity(entity); InputStream instream = bufHttpEntity.getContent();Bitmap bm = BitmapFactory.decodeStream(instream); Bitmap useThisBitmap = Bitmap.createScaledBitmap(bm,bm.getWidth(),bm.getHeight(), true);bm.recycle(); BitmapDrawable bt= new BitmapDrawable(useThisBitmap);System.gc();
05-28 14:55:47.251: ERROR/AndroidRuntime(4188): java.lang.OutOfMemoryError: bitmap size exceeds VM budget
慕沐林林
神不在的星期二
芜湖不芜
相关分类