在react-native-linear-gradient(-lBVLinearGradient)上进行React Native Xcode构建错误

时间:2019-11-14 11:31:47

标签: react-native

我已经按照github页面上的说明进行了所有安装过程,以获取react-native-linear-gradient。

但是当我尝试为ios(通过react-native run-ios命令和Xcode进行编译)时,出现以下错误:

ld: library not found for -lBVLinearGradient
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我已经通过xcworkspace打开了该项目,其中大多数建议在使用Cocoapods时是这样的,但是无论如何错误仍然存​​在。

对此有任何线索吗?

1 个答案:

答案 0 :(得分:0)

在升级0.62.1之后,我遇到了同样的问题,下面的方法对我有用:

  1. 将我的项目切换到新的构建系统(正在使用旧版)
  2. 手动删除ios文件夹中的.xcworkspace
  3. 从模拟器中删除了应用程序(也删除了所有导出的数据),请参见how
  4. rm -rf node_modules && sudo yarn install
  5. cd ios && pod deintegrate
  6. pod install
  7. 在xcode中运行项目

这对我有用,希望它能对某人有所帮助