//为什么使用getContentResolver呢?因为在相册本身是一个内容提供者 protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); Uri photoFileUri=data.getData(); if (requestCode==OK) { try { Bitmap bitmap=BitmapFactory.decodeStream (getContentResolver().openInputStream(photoFileUri)); } catch (Exception e) { e.printStackTrace(); } } }