我没有解决这个错误成功:位图和相机
java.lang.OutOfMemoryError: bitmap size exceeds VM budget.
我的代码是:
BitmapFactory.Options op = new BitmapFactory.Options();
myBitmap = BitmapFactory.decodeFile(file.getAbsolutePath(),op);
ImageView _image = (ImageView)view.findViewById(R.id.imageCarte);
int width = myBitmap.getWidth();
int height = myBitmap.getHeight();
int halfWidth = width/2;
int halfHeight = height/2;
Bitmap bmHalf = Bitmap.createScaledBitmap(myBitmap, halfWidth, halfHeight, false);
_image.setImageBitmap(bmHalf);
这个问题是转贴:http://stackoverflow.com/questions/10460588/java-lang-的OutOfMemoryError#comment13509696_10460588。 –