cursor空指针
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if(requestCode == PICK_CODE){
if(data!=null){
Uri uri = data.getData();
Cursor cursor = getContentResolver().query(uri,null,null,null,null);
Log.e("TAG",cursor.toString());
cursor.moveToFirst();
int idx = cursor.getColumnIndex(MediaStore.Images.ImageColumns.DATA);
mCurrentPhotoStr = cursor.getString(idx);
cursor.close();
resizePhoto();
mPhoto.setImageBitmap(mPhotoImg);
mTip.setText("Click Detect ==>");
}
}
super.onActivityResult(requestCode, resultCode, data);
}
cursor 是空指针看不错,是哪里有问题