react-native-view-shot error: failed to capture view snapshot on android with MaskedView from '@react-native-community/masked-view'
DmitryB11 opened this issue · comments
DmitryB11 commented
I use react-native-view-shot and it works with no problem on iOS but on Android I got
error: failed to capture view snapshot
I put collapsable={false} but it is not works. It only works if I remove MaskedView, but I can't do it because I need it in my code.
My code about the same as in this post.
MaskedView from '@react-native-community/masked-view'
<MaskedView maskElement={
<Text style={[styles.label, styleLabelAlign, styleLabelSize, styleLabelWeight, props.styleText]}>
{labels?.join('\n')}
</Text>
}>
<LinearGradient start={{ x: 0, y: 1 }} end={{ x: 1, y: 0 }} colors={[props.primaryColor, props.secondaryColor]}>
<Text style={[styles.label, styleLabelAlign, styleLabelSize, styleLabelWeight, props.styleText, { opacity: 0 }]}>{labels?.join('\n')}</Text>
</LinearGradient>
</MaskedView>
`
Originally posted by @prani95 in #489 (comment)