ios - 找不到-lyoga的资料库

标签 ios xcode react-native compiler-errors react-native-ios

上下文
我已经将我的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/
我的Podfile
   # 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

关于ios - 找不到-lyoga的资料库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63266004/

相关文章:

ios - 需要一些关于调度队列、线程和 NSRunLoop 的说明

ios - 打印后删除文件

ios - 是否禁止在 AppStore 的 iOS 应用程序中使用 JIT(即时)编译代码?

ios - AVPlayer 流媒体延迟

ios - 如何将 UIDevice.h 还原为原始版本?

Swift - 从子类访问属性时遇到问题

c++ - 设计这个简单的 ReactNative AR 应用程序的最佳方法是什么?

android - react-redux 调度操作不适用于 android 但适用于 ios

ios - 远程配置 A/B 测试不会在测试设备上触发(或 100% 匹配)

android - 即使应用程序在后台,React Native Android 应用程序每小时消耗 30mA