Open rizwanellahi opened 4 years ago
Please check your data at first maybe there has a null reference. I guess
Images thumbnails are showing <Image style={imageStyle} source={{uri: cat.url}} />
In image source we are converting the image url to uri. But in data={photos}
how image will be convert into uri.
That's why whenever i tap on the image for preview throwing this error:
Attempt to invoke interface method 'java.lang.string com.facebook.react.bridge.readablemap.getstring on a null object reference
@Rizwanilahi Could you please checkout the examples and then re-check your data. I think this should not an issue with this pkg.
@bang88 The example is working fine.
const photos = [
{
source: {
uri:
"https://images.pexels.com/photos/82072/cat-82072.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb"
}
}
];
The image source Uri is already defined here. In my case, I am using API receiving data. const photos = this.props.navigation.getParam('getPhotos').acf.gallery;
You can normalize your data structure to fit your needs.
Rizwan Ellahi notifications@github.com于2020年1月16日 周四18:07写道:
@bang88 https://github.com/bang88 The example is working fine.
const photos = [ { source: { uri: "https://images.pexels.com/photos/82072/cat-82072.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb" } } ];
The image source Uri is already defined here. In my case, I am using API receiving data. const photos = this.props.navigation.getParam('getPhotos').acf.gallery;
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/merryjs/photo-viewer/issues/106?email_source=notifications&email_token=AADJY22IFXLNKYBGBEM77STQ6AWV3A5CNFSM4KFZPXFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJDP7ZQ#issuecomment-575078374, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADJY242DMHQVQ2K3QCZPY3Q6AWV3ANCNFSM4KFZPXFA .
Passing Data Using React-Navigation. Only grid images showing but the image preview throwing android error.
"react-native": "0.61.5", "@merryjs/photo-viewer": "^3.1.2",
Android Error