Skip to content
This repository has been archived by the owner on Nov 27, 2022. It is now read-only.

Native module cannot be null #711

Closed
ThomasSchuIz opened this issue Mar 13, 2019 · 8 comments
Closed

Native module cannot be null #711

ThomasSchuIz opened this issue Mar 13, 2019 · 8 comments

Comments

@ThomasSchuIz
Copy link

ThomasSchuIz commented Mar 13, 2019

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

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
@erennyuksell
Copy link

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

@ThomasSchuIz
Copy link
Author

@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] ?

@nlabofa
Copy link

nlabofa commented Mar 15, 2019

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

@ThomasSchuIz
Copy link
Author

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

@satya164
Copy link
Owner

satya164 commented Mar 15, 2019

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.

@satya164
Copy link
Owner

satya164 commented Apr 1, 2019

Closing due to no response.

@satya164 satya164 closed this as completed Apr 1, 2019
@dominik-mrugalski
Copy link

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:
software-mansion/react-native-gesture-handler#404 (comment)
https://stackoverflow.com/a/51372213/7666033

@Luckygirlllll
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants