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

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

Why this error happen?

screen shot 2019-03-08 at 13 23 54

Most helpful comment

I have the same issue on iOS.

All 11 comments

I have the same issue on iOS.

I have the same issue on iOS.

exactly, can you solve this?

Please link react-native-reanimated as mentioned in the installation instructions, and fill the issue template when reporting issues.

Please link react-native-reanimated as mentioned in the installation instructions, and fill the issue template when reporting issues.

But i've link react-native-reanimated?

If linking is not working properly, report the issue in react-native-reanimated repo with a proper repro since the error is coming from that library

Just ran into this problem and I have this problem every time because react-native link has never worked for me. So adding this to your Podfile

pod 'RNReanimated', :path => '../node_modules/react-native-reanimated'
and then pod install will do the trick.

I had previously installed RN gesture handler but if you are facing that issue, than solve it in the same way:

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

Any updates to this? None of the suggested ideas worked

Idk if its because I'm a noob, but doing what @pmadruga recommended caused serious collisions with my node_modules & podfile. I had to completely override my local branch with my remote & clear my cache to fix the issue

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.xcodeprojto the libraries folder, then add libReanimated.a to the link binary with libraries

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

if you using react-native-firebase on ios please check the podfile should look like this. SEE THE "### CHECK THIS POD [NAME] ###"

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

target 'TGus' do
  # Comment the next line if you don't want to use dynamic frameworks
  # use_frameworks!

  # Pods for TGus

  # See http://facebook.github.io/react-native/docs/integration-with-existing-apps.html#configuring-cocoapods-dependencies

 ### CHECK THIS POD REACT!!! ###
  pod 'React', :path => '../node_modules/react-native', subspecs: [
    'Core',
    'CxxBridge', # Include this for RN >= 0.47
    'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
    'RCTActionSheet',
    'RCTAnimation',
    'RCTGeolocation',
    'RCTImage',
    'RCTLinkingIOS',
    'RCTNetwork',
    'RCTSettings',
    'RCTText',
    'RCTVibration',
    'RCTWebSocket'
  ]

 ### CHECK THIS POD YOGA###, ### RNReanimated### , ### RNGestureHandler!!!###
  # Explicitly include Yoga if you are using RN >= 0.42.0
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
  pod 'RNReanimated', :path => '../node_modules/react-native-reanimated'
  pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'

### PLEASE CHECK POD FOLLY ###
  # Third party deps podspec link
  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

  pod 'Firebase/Core'
  # pod 'RNFirebase', :path => '../node_modules/react-native-firebase/ios'
  pod 'Firebase/Analytics'
  pod 'Firebase/Database'
  pod 'Firebase/Firestore'
  pod 'Firebase/Functions'
  pod 'Firebase/Auth'
  pod 'Firebase/Messaging'
  pod 'Firebase/Storage'

### PLEASE CHECK TARGET ###
  post_install do |installer|
    installer.pods_project.targets.each do |target|
      if target.name == "React"
        target.remove_from_project
      end

      targets_to_ignore = %w(React yoga)
      if targets_to_ignore.include? target.name
        target.remove_from_project
      end

      # rnfirebase = installer.pods_project.targets.find { |target| target.name == 'RNFirebase' }
      # rnfirebase.build_configurations.each do |config|
        # config.build_settings['HEADER_SEARCH_PATHS'] = '$(inherited) ${PODS_ROOT}/Headers/Public/**'
      # end
    end
  end
end
Was this page helpful?
0 / 5 - 0 ratings

Related issues

jouderianjr picture jouderianjr  路  3Comments

AndriiUhryn picture AndriiUhryn  路  3Comments

itzsaga picture itzsaga  路  3Comments

KingAmo picture KingAmo  路  3Comments

hyochan35 picture hyochan35  路  3Comments