找不到 -lyoga 的库

Library not found for -lyoga

上下文

我已经将我的 react-native 应用程序从 0.59.10 更新到 0.60.6。 在正常方案中一切正常,但是当我将方案更改为另一个方案时,会发生此错误:

问题:

ld: warning: directory not found for option '-L/Users/estuda-dev/Library/Developer/Xcode/DerivedData/EstudaVest-doghqrjrnoismnaovlqaiexzwebm/Build/Products/Debug.CPB-iphonesimulator/yoga'
ld: warning: directory not found for option '-F/Users/estuda-dev/workspace/estuda_app_aluno/ios/build/Debug-iphoneos'
ld: library not found for -lyoga
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Build failed    05/08/20 08:32    320.8 seconds

我试过的:

在此之后,我尝试按照本教程删除 Developer/Xcode 中的 DerivedData:

https://programmingwithswift.com/delete-derived-data-xcode/

我的播客文件

   # Uncomment this line to define a global platform for your project
platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

target 'appname' do
  # Uncomment this line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for appname
  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/react-native/React'
  pod 'React-DevSupport', :path => '../node_modules/react-native/React'
  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
  pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
  pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'

  pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

  pod 'RNRate', :path => '../node_modules/react-native-rate'


  pod 'react-native-simple-toast', :path => '../node_modules/react-native-simple-toast'

  pod 'GoogleSignIn', '~> 5.0.2'

  post_install do |installer|
    installer.pods_project.targets.each do |target|
      if target.name == "React" || target.name == "yoga"
        target.remove_from_project
      end
    end
  end

  target 'appnameTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'appnameUITests' do
    inherit! :search_paths
    # Pods for testing
  end
  
  use_native_modules!
end

为了解决这个问题,我制作了一个在构建阶段运行的脚本,以在此路径中创建一个“yoga.a”文件:

~/Library/Developer/Xcode/DerivedData/YourProjectNamePlusID/Build/Intermediates.noindex/ArchiveIntermediates/YourBundlename/BuildProductsPath/Release