React Native undefined is not an object (evaluating 'RNGestureHandlerModule.State')

前言:

当使用RN开发跨平台app时,使用的组件(如,react-navigation...),这个组件可能是需要链接原生库的。就是说要使用react-native  link

如使用到需要链接原生库,而没有 react-native link,运行时报:undefined is not an object (evaluating 'RNGestureHandlerModule.State')

---------------------

Code:

当前项目根目录下如下命令:

npm install --save react-native-gesture-handler

react-native link


重新运行项目:

➜ react-native run-ios

➜ react-native run-android

猜你喜欢

转载自blog.csdn.net/weixin_34202952/article/details/87606486