React-Native 错误 ld:找不到 -lBVLinearGradient 的库

Abh*_*til 6 xcode ios react-native

在我的新react-native项目中安装了“react-native-lienar-gradient”库。

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

在 ios 目录中执行 pod install

Xcode 构建出现以下错误:

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

Xcode 中的错误

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

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

环境

反应本机:0.63.2

反应本机线性梯度:2.5.6

Gli*_*nab 6

你能试试这个吗?

\n

首先解散并再次安装 Pod

\n
    \n
  1. sudo gem update \xe2\x80\x93system
  2. \n
  3. sudo gem install -n /usr/local/bin cocoapods
  4. \n
  5. pod setup
  6. \n
  7. cd ios
  8. \n
  9. pod deintegrate
  10. \n
  11. pod install
  12. \n
\n

然后返回deleting ios build and watchman并通过clearing metro server and simulator cache和运行应用程序deleting and reinstalling node modules

\n
    \n
  1. cd ..
  2. \n
  3. \n
    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\n
    Run Code Online (Sandbox Code Playgroud)\n
  4. \n
\n