简体   繁体   English

ld: 找不到 -lReact-RCTVibration 的库

[英]ld: library not found for -lReact-RCTVibration

I am able to build and run the app in a simulator.我能够在模拟器中构建和运行该应用程序。 However, whenever I want to archive it (selecting any ios devices) to release the app into the AppStore, I am getting this error.但是,每当我想存档它(选择任何 ios 设备)以将应用程序发布到 AppStore 时,我都会收到此错误。

ld: warning: directory not found for option '-L/Users/bigyankarki/Library/Developer/Xcode/DerivedData/Neex-dnesybikpygafkfxhimxsgrjawis/Build/Intermediates.noindex/ArchiveIntermediates/Neex/BuildProductsPath/Release-iphoneos/React-RCTVibration'
ld: warning: directory not found for option '-L/Users/bigyankarki/Library/Developer/Xcode/DerivedData/Neex-dnesybikpygafkfxhimxsgrjawis/Build/Intermediates.noindex/ArchiveIntermediates/Neex/BuildProductsPath/Release-iphoneos/react-native-safe-area-context'
ld: library not found for -lReact-RCTVibration
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have followed this , and other multiple solutions with the same library not found error, but to no avail.我遵循了这个,以及其他具有相同库的多个解决方案未找到错误,但无济于事。 I even included it to podfile,我什至将它包含在 podfile 中,

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '12.4'

target 'Neex' do
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => false
  )
  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'


  pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-async-storage/async-storage'

  pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'

  pod 'RNSVG', :path => '../node_modules/react-native-svg'

  target 'NeexTests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable the next line.
  use_flipper!()

  post_install do |installer|
    react_native_post_install(installer)
  end
end

and even linked it in buildphase, but none works.甚至将其链接到构建阶段,但没有一个有效。 在此处输入图像描述

I solved the problem by setting 'Build setting architectures only' to Yes for both release and debug.我通过在发布和调试中将“仅构建设置架构”设置为“是”解决了这个问题。 After that, the problem seems to be resolved and I was able to archive the app.在那之后,问题似乎得到了解决,我能够存档应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM