Попробуйте это
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == 1 && resultCode == RESULT_OK && data != null) {
Uri uri = data.getData();
CropImage.activity(uri)
.setAspectRatio(1, 1)
.setGuidelines(CropImageView.Guidelines.ON)
.start(getActivity(), this);
}
if (requestCode == 0 && resultCode == RESULT_OK && data != null) {
Bitmap bm = (Bitmap) data.getExtras().get("data");
Uri tempUri = getImageUri(getApplicationContext(), bm);
CropImage.activity(tempUri)
.setAspectRatio(1, 1)
.setGuidelines(CropImageView.Guidelines.ON)
.start(getActivity(), this);
}
if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {
CropImage.ActivityResult result = CropImage.getActivityResult(data);
if (resultCode == RESULT_OK) {
Uri resultUri = result.getUri();
Glide.with(this)
.load(resultUri)
.apply(RequestOptions.circleCropTransform())
.into(profileimage);
} else if (resultCode == CropImage.CROP_IMAGE_ACTIVITY_RESULT_ERROR_CODE) {
Exception error = result.getError();
}
}
super.onActivityResult(requestCode, resultCode, data);
}