React-native-tab-view: Native module cannot be null

Created on 13 Mar 2019  路  8Comments  路  Source: satya164/react-native-tab-view

Current behaviour

When I try to use the react-native-tab-view I get "Native module cannot be null" error

Expected behaviour

I'm expecting to be able to see the tab menu on render

Code sample

See screenshots

Screenshots (if applicable)

Screen Shot 2019-03-13 at 3 23 00 AM

image

image

What have you tried

  • Uninstalling & reinstalling the native libraries reanimated & gesture-handlers
  • Researching other related threads like #709
    - Taking some of the advice from #709
  • Reinstalling entire project

Your Environment

| software | version
| ---------------------------- | -------
| android or ios | ios
| react-native | 0.55.2
| react-native-tab-view | latest
| react-native-gesture-handler | latest
| react-native-reanimated | latest
| node | v10.11.0
| npm or yarn | yarn

needs repro

Most helpful comment

The issue is that react-native link react-native-reanimated is not properly linking the react-native-reanimated library. You have to link it manually in Xcode. i.e add RNReanimated.xcodeproj to the libraries folder, then add libReanimated.a to the link binary with libraries

All 8 comments

You should try update your RN version or downgrade react-native-tab-view version to 1.3.2.

@Frekansapp bit of a noob lol. How do you downgrade react-native-tab-view? I found information about how to downgrade RN, but nothing on tabs.

I figure I should do this because it'll cause less conflicts [downgrading react-native-tab-view] - unless it's better to upgrade [RN] ?

The issue is that react-native link react-native-reanimated is not properly linking the react-native-reanimated library. You have to link it manually in Xcode. i.e add RNReanimated.xcodeproj to the libraries folder, then add libReanimated.a to the link binary with libraries

@nlabofa I did that when I made the initial post & got the current result. Do you know how to downgrade a particular library?

Do you know how to downgrade a particular library

You change the version in package.json to what you want and run yarn/npm.

Also please provide a Git repo with the issue.

Closing due to no response.

My fix for this problem:

Add those line to your podfile:

pod 'React', :path => '../node_modules/react-native'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'

After that remove pod folder and install it again:

rm -rf Pods
pod install

Sources:
https://github.com/kmagiera/react-native-gesture-handler/issues/404#issuecomment-481057462
https://stackoverflow.com/a/51372213/7666033

Hm, manual linking didn't help me, any other solutions for this problem?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AndriiUhryn picture AndriiUhryn  路  3Comments

karthikeyansundaram2 picture karthikeyansundaram2  路  3Comments

satya164 picture satya164  路  3Comments

jouderianjr picture jouderianjr  路  3Comments

itzsaga picture itzsaga  路  3Comments