ld:找不到用于 -lDoubleConversion 的库

时间:2021-07-01 18:52:47

标签: react-native cocoapods

所以我试图将我的 RN 从 0.61.5 -> 0.64.2 升级。

尝试运行 react-native run-ios 时出现此错误

lang: error: linker command failed with exit code 1 (use -v to see invocation)

我的 Podfile

source 'https://github.com/CocoaPods/Specs.git'
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
use_frameworks!

platform :ios, '10.0'

target '{MY_APP_NAME_HERE}' 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
  )

  target '{MY_APP_NAME_HERE}Tests' 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)
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0'
        end
    end
  end

  $static_framework = ['FlipperKit', 'Flipper', 'Flipper-Folly',
    'CocoaAsyncSocket', 'ComponentKit', 'DoubleConversion',
    'glog', 'Flipper-PeerTalk', 'Flipper-RSocket', 'Yoga', 'YogaKit',
    'CocoaLibEvent', 'OpenSSL-Universal', 'boost-for-react-native']

  pre_install do |installer|
    Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
    installer.pod_targets.each do |pod|
        if $static_framework.include?(pod.name)
          def pod.build_type;
            Pod::BuildType.static_library
          end
        end
      end
    end
end

尝试过:

  1. 使用 .xcworkspace 从 xCode 构建它
  2. 删除 node_modules -> yarn install
  3. 删除 /Pods 和 podfile.lock -> pod install

任何帮助将不胜感激

代码:12.4

0 个答案:

没有答案