最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - null is not an object (evaluating '_RNGestureHandlerModule.default.Direction') - Stack Overflow

programmeradmin0浏览0评论

I followed the instructions for installing react-navigation 3.x from their website. I re-built the app and even created new project and followed the instructions again. but still getting the same above error. any idea?

edit: I am running the app react-native cli using react-native run-ios. I am not using Xcode

error screenshot

I followed the instructions for installing react-navigation 3.x from their website. I re-built the app and even created new project and followed the instructions again. but still getting the same above error. any idea?

edit: I am running the app react-native cli using react-native run-ios. I am not using Xcode

error screenshot

Share Improve this question edited Jul 6, 2019 at 16:08 Akram asked Jul 6, 2019 at 15:59 AkramAkram 972 silver badges8 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 4

Looks like this is to do with the new autolinking feature in RN 0.60.

To fix for now just add the following podspec for RNGesureHandler to ios/Podfile

pod 'RNGestureHandler', :podspec => '../node_modules/react-native-gesture-handler/RNGestureHandler.podspec'

Then in the ios directory run pod install to install it.

As mentioned here do the following:

  • Right Click Libraries "Add Files to Project"
  • /node_modules/react-native-gesture-handlers/ios/RNGestureHandler.xcodeproj
  • Go to build phases and add libRNGestureHandler.a
  • Run

I had this and solved by updating the pod spec and then rebuilding in Xcode.

# from project root
cd ios
pod update

Then re-run from Xcode

发布评论

评论列表(0)

  1. 暂无评论