react-native-linear-gradient: library not found for -LBVLinearGradient
Hello everyone, I have a problem and would like to know if you have had the same problem. library not found for -LBVLinearGradient
I already did it
npm install react-native-linear-gradient --save
cd ios
pod install
cd ..
react-native link react-native-linear-gradient
package.json
"react": "16.8.6",
"react-native": "0.59.10",
"react-native-linear-gradient": "2.5.3",
Xcode Version 11.3 (11C29)
I appreciate if someone can help me
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 28
- Comments: 38 (5 by maintainers)
We’ve managed to fix the issue in our project 🎉 The issue had nothing to do with
-LBVLinearGradient, it was just first library “in the order”.What helped is:
Also you should use
xcworkspaceinstead ofxcodeprojwhen building from XCode (I think CLI does this automatically).Now everything works fine both on our local machines and on CI.
If this doesn’t help, maybe deleting cashes after doing above mentioned steps will. Here is our
clear-cache“super script”:"clear-cache": "npm run clear-xcode-cache && watchman watch-del-all && rm -rf $TMPDIR/react-* && npm cache verify && rm -rf node_modules/ && npm run clear-npm-pod-cache && rm -rf ios/build/ && cd android && ./gradlew clean && cd .. && npm run start-no-cache""clear-xcode-cache": "cd ios && bash ../resetXcode.sh && cd../"(will paste code from resetXcode.sh below)"clear-npm-pod-cache": "rm -rf ios/Podfile.lock && rm -rf package-lock.json && npm run npm-pod-install""npm-pod-install": "npm install && npm run pod-install""pod-install": "cd ios/ && pod install && cd ..",resetXcode.sh, huge thanks to maciekish/resetXcode.sh, we have just copied it to our project 😃I tried everything else for hours, what worked was setting in my Podfile :
The same as the
iOS Deployment Target VersioninInfo.plist. They were different.This has to match
This fixed it for me https://github.com/react-native-linear-gradient/react-native-linear-gradient/issues/452#issuecomment-750325305
platform version in Pod File platform :ios, ‘11.0’
had to match with deployment info : deployment version in General.
For my case the problem was pretty simple, I was using cocoapods and not openning my project in Xcode from the .xcworkspace
I have the same issue here, and none of the mentionned fixes solved my issue. RN 0.61.2 with react-native-linear-gradient 2.5.6
Please check if your Pod file platform :ios, ‘11.0’ matches with the minimum deployment target in the XCODE setting…
Got it to work! Not sure which of these steps did it.
pod deintegratethenpod install$(inherited)Thanks everyone
Same here:
Same issue here
Though It is matching for me, error still persists.
Only if i run code in release mode from xocde by editing schema, error not shows. It is working fine in release mode.
But i want to run the code in debug mode only for testing purpose.
Any other solution?
Thanks for the additional information @puremana - I’ll check this later.
@friederbluemle I’m on react native 0.61.5 and react-native-linear-gradient 2.5.6 and yet I’m having the same issue.
package.json Full error log
I am also experiencing this. Did you manage to find a solution?