App crashed when I try image cropp from gallery at Android 5.1


#1

App crashed when I try image cropp from gallery at Android 5.1. From camera it’s working. Also with previous andoid it’s working.
const cameraOptions = {
sourceType: Camera.PictureSourceType.SAVEDPHOTOALBUM,
destinationType: Camera.DestinationType.FILE_URI,
quality: 50,
targetWidth: 640,
targetHeight: 640,
encodingType: Camera.EncodingType.JPEG,
correctOrientation: true,
mediaType: Camera.MediaType.PICTURE,
allowEdit: true
};
Camera.getPicture(cameraOptions)
.then(fileUri => {
this.profileImage = fileUri;
}, err => alert(JSON.stringify(err)));