when i try to access the photos using react-native-image-picker it returns an error 'null is not an object(evaluating 'ImagePickerManager.showImagePicker')'.
i have tried linking the libraries deleting node modules and then again etc but none worked.
const ImagePicker = require("react-native-image-picker");
<TouchableOpacity
onPress={() => {
const options = {
title: "Select Profile Pic",
mediaType: "photo",
takePhotoButtonTitle: "Take a Photo",
maxWidth: 256,
maxHeight: 256,
allowsEditing: true,
noData: true
}
ImagePicker.showImagePicker(options, response => {
if (response.uri){
this.setState({photo: response})
}
})
firebase.storage.ref().child(`chatImg/${this.state.photo.uri}`);
}}
style={{ flexDirection: 'row' }}
>
<View style={{ width: 15 }} />
<AutoHeightImage width={35} source=
{require('../../resource/icon_attach.png')} />
<View style={{ width: 5 }} />
</TouchableOpacity>