react-native-linear-gradient: Native component for "BVLinearGradient" does not exist.
I checked both issues related to this problem, #263 and #157. But the problem is that I am still getting this error,
Native component for “BVLinearGradient” does not exist
I don’t know how to solve this. react-native-linear-gradient is linked to my project, react-native-linear-gradient added in my project. libBVLinearGradient.a added in Link Binaries with Libraries. You can check my project screenshot below,

How to resolve this error?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 14
- Comments: 17 (1 by maintainers)
If you are still having trouble with this and have tried the all of the advice in this repo: I followed some of the steps here and managed to get it working.
1.Delete
/iosand/androidfolders from root folder 2.Runreact-native upgradefrom the terminal inside your root folder 3.Runreact-native link4.Runreact-native run-iosCheck whether these two lines are in your ‘podFile’ referring cocoapods section in README.MD
pod 'React', :path => '../node_modules/react-native'pod 'BVLinearGradient', :path => '../node_modules/react-native-linear-gradient'Run
pod installunder$project path/iosbeforereact-native run-iosIf anyone is having the linking problem, I recommend NOT to use pod to link the library. For some reasons I just couldn’t get it work.
Here is what I did:
BVLinearGradient.podspecfile to something likeBVLinearGradient.xxxpodspec. This is to preventreact-native linkto link the library using Podfile. See: https://facebook.github.io/react-native/docs/linking-libraries-ios.html#step-2react-native linkno idea how I fixed, but got it working after 1 hour.
steps I did:
Had same issue with iOS but manually linking resolved it.
It works with pod install!!! Just edit the ‘Podfile’ inside ios folder: pod ‘SRSRadialGradient’, :path => ‘…/node_modules/react-native-radial-gradient/’ and change the path to: pod ‘SRSRadialGradient’, :path => ‘…/node_modules/react-native-radial-gradient/ios’
Then run pod install again.
I could not get mine to work with the manual instructions from the readme either. I struggled for ages and got it to work by doing the following:
$(SRCROOT)/../node_modules/react-native-linear-gradientAfter that I could compile the app using
react-native run-iosagain.That somehow sorted it out for me.