javascript - React-Native TouchableNativeFeedback.Ripple is not function -


when running app on simulator ios 10.3 iphone 6 , there no problem exception this, when running on real phone getting exception:

_reactnative.touchablenativefeedback.ripple not function. (in '_reactnative.touchablenativefeeedback.ripple(_platform2.default.androidripplecolor)','_reactnative.tochablenativefeedback.ripple' undefined) 

this happend when perform touch on component:

<view style={styles.centerview}>    <touchableopacity style={styles.touch} onpress={this.opencamera} >         <image             source={require('assets/img/camera.png')}             style={styles.cameraicon}          >           </image>     </touchableopacity>    <text style={styles.text}>{translate.t('opencamera')}</text> </view>   var styles = stylesheet.create({     centerview: {         flex: 1,         alignitems: 'center',         justifycontent:'center',         flexdirection: 'column'     },      cameraicon: {         width:'100%',         height: '100%',         resizemode: 'contain',      },      touch: {         width:'80%',         height: '50%',         marginbottom: 15,         backgroundcolor:"transparent"     },      text: {         color: '#949494',         width:'85%',         alignself: 'center',         textalign: 'center',         fontsize: responsivefontsize(3),     }, }); 

and onpress actions.camera() call of react-router-redux-flux

this code working on android in debug , dist mode. code working on ios simulator ,but not working on device.

can point me error?

touchablenativefeedback wrapper making views respond touches (android only). on android component uses native state drawable display touch feedback.

use touchablehighlight or touchableopacity


Comments