lBVLinearGradient的库

lBVLinearGradient的库

本文介绍了React-Native错误ld:找不到-lBVLinearGradient的库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的新react-native项目中安装了"react-native-lienar-gradient"库.

Installed 'react-native-lienar-gradient' library in my new react-native project.

添加了pod'BVLinearGradient',:path =>Podfile中的'../node_modules/react-native-linear-gradient'

Added pod 'BVLinearGradient', :path => '../node_modules/react-native-linear-gradient' in Podfile

在iOS目录中执行pod安装

Performed pod install in ios directory

Xcode构建会出现以下错误:

Xcode build gives the following error:

ld:警告:找不到选项'-L-L/Users/pavneet/Library/Developer/Xcode/DerivedData/Krowym-fttolxdorzfwjbcgjwmxijsnufkv/Build/Products/Debug-iphonesimulator/BVLinearGradient'的目录ld:找不到-lBVLinearGradient的库clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)

Xcode错误

尝试删除Podfile.lock,清理xcode构建,通过react-native链接命令手动链接库,删除派生数据文件夹

Tried deleting Podfile.lock, cleaning xcode build, manually linking library by react-native link command, deleting Derived data folder

还尝试通过在构建阶段添加libBVLinearGradient.a->将二进制文件与库链接

Also tried by adding libBVLinearGradient.a on Build Phases -> Link Binary With Libraries

环境

反应本机:0.63.2

react-native:0.63.2

react-native-linear-gradient:2.5.6

react-native-linear-gradient:2.5.6

推荐答案

可以尝试一下.

首先解体并再次安装吊舱

First deintegrate and install the pods again

  1. sudo gem update –system
  2. sudo gem install -n/usr/local/bin cocoapods
  3. pod设置
  4. cd ios
  5. pod解体
  6. pod安装
  1. sudo gem update –system
  2. sudo gem install -n /usr/local/bin cocoapods
  3. pod setup
  4. cd ios
  5. pod deintegrate
  6. pod install

然后通过删除ios build和watchman ,并清除Metro服务器和模拟器缓存,以及删除并重新安装节点模块,返回并运行应用程序代码>

And then go back and run the app by deleting ios build and watchman and clearing metro server and simulator cache and also deleting and reinstalling node modules

  1. cd ..
watchman watch-del-all && rm -rf $TMPDIR/react-*  && rm -fr $TMPDIR/metro-cache* && rm -fr $TMPDIR/haste-map-metro*  &&  rm -rf ios/build && xcrun simctl erase all && rm -rf node_modules/ && npm cache verify && npm install && react-native run-ios -- --reset-cache

这篇关于React-Native错误ld:找不到-lBVLinearGradient的库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-25 08:52