ld: не найдена библиотека для -lRCTAnimation

Описание

После обновления нативной версии до 0-62.2 я столкнулся со многими проблемами. Это один из них в следующем вопросе:

-- Я взял эту страницу для справки и отредактировал ее https://react-native-community.github.io/upgrade-helper/?from=0.59.3&to=0.62.0

Версия React Native:

реагировать родной cli: 2.0.1

реактивный родной: 0.62.2

**Expected Results**
clang: error: linker command failed with exit code 1 (use -v to see invocation)

ld: library not found for -lRCTAnimation
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 6.0, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'OpenSSL-Universal' from project 'Pods')

** BUILD FAILED **


The following build commands failed:
        Ld /Users/ibrahimyolbir/Library/Developer/Xcode/DerivedData/DGFonder-fxqthwkcalsxjgaeqbdxsodcnrou/Build/Products/Debug-iphonesimulator/DGFonder.app/DGFonder normal x86_64
(1 failure)
**Podfile**

platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'


def flipper_pods()
  flipperkit_version = '0.34.0'
  pod 'FlipperKit', '~>' + flipperkit_version, :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitLayoutPlugin', '~>' + flipperkit_version, :configuration => 'Debug'
  pod 'FlipperKit/SKIOSNetworkPlugin', '~>' + flipperkit_version, :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitUserDefaultsPlugin', '~>' + flipperkit_version, :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitReactPlugin', '~>' + flipperkit_version, :configuration => 'Debug'
end

# Post Install processing for Flipper
def flipper_post_install(installer)
  installer.pods_project.targets.each do |target|
    if target.name == 'YogaKit'
      target.build_configurations.each do |config|
        config.build_settings['SWIFT_VERSION'] = '4.1'
      end
    end
  end
  file_name = Dir.glob("*.xcodeproj")[0]
  app_project = Xcodeproj::Project.open(file_name)
  app_project.native_targets.each do |target|
    target.build_configurations.each do |config|
      cflags = config.build_settings['OTHER_CFLAGS'] || '$(inherited) '
      unless cflags.include? '-DFB_SONARKIT_ENABLED=1'
        puts 'Adding -DFB_SONARKIT_ENABLED=1 in OTHER_CFLAGS...'
        cflags << '-DFB_SONARKIT_ENABLED=1'
      end
      config.build_settings['OTHER_CFLAGS'] = cflags
    end
    app_project.save
  end
  installer.pods_project.save
end



target 'DGFonder' do
  pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
  pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
  pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
  pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/react-native/'
  pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
  pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
  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-Core/RCTWebSocket', :path => '../node_modules/react-native/'
  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 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
  pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
  pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/Yoga', :modular_headers => true
  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'

  use_native_modules!


  target 'DGFonderTests' do
    inherit! :search_paths
    # Pods for testing
  end
  flipper_pods()
  post_install do |installer|
    flipper_post_install(installer)
    installer.pods_project.targets.each do |target|
      if target.name == 'react-native-config'
        phase = target.project.new(Xcodeproj::Project::Object::PBXShellScriptBuildPhase)
        phase.shell_script = "cd ../../"\
                             " && RNC_ROOT=./node_modules/react-native-config/"\
                             " && export SYMROOT=$RNC_ROOT/ios/ReactNativeConfig"\
                             " && export BUILD_DIR=$RNC_ROOT/ios/ReactNativeConfig"\
                             " && ruby $RNC_ROOT/ios/ReactNativeConfig/BuildDotenvConfig.ruby"

        target.build_phases << phase
        target.build_phases.move(phase,0)
      end
    end

  end
end

ProjectName > Этапы сборки > Связать двоичный файл с библиотеками

введите здесь описание изображения


person Ibrahim Yolbir    schedule 27.04.2020    source источник
comment
Многое изменилось в RN 0.60+. Вы пытались удалить папку node_module, а затем установить npm + pod install?   -  person CR7    schedule 27.04.2020
comment
Да. я везде ищу -lRCTAnimation даже в гугле. Но я ничего не могу найти об этом. Знаете ли вы, почему здесь стоит -l в начале -lRCTAnimation?   -  person Ibrahim Yolbir    schedule 27.04.2020


Ответы (1)


Можете ли вы попытаться удалить всю связанную библиотеку React Native в Xcode?

  1. Откройте файл Project.xcworkspace в Xcode
  2. Перейти на вкладку навигатора проекта
  3. Перейдите на вкладку «Этапы сборки».
  4. Затем в разделе «Связать двоичный файл с библиотеками»: Удалить все двоичные файлы -libRCT*

С RN 60+ теперь они включены в проект Pods.

person CR7    schedule 27.04.2020
comment
Спасибо, я удалил все двоичные файлы -libRCT. Я загрузил свой двоичный файл Link With Libraries, как показано на изображении выше, вы можете видеть, что я пропускаю эту ошибку. Теперь у меня есть другие ошибки :) - person Ibrahim Yolbir; 27.04.2020
comment
У вас есть какое-нибудь представление об этом; ld: не найдена библиотека для -BVLinearGradient - person Ibrahim Yolbir; 27.04.2020
comment
@IbrahimYolbir Да, вы должны проверить документацию пакета, он расскажет вам, как правильно установить. Обычно у вас есть 3 решения в зависимости от версии RN, которую вы используете: 1) просто npm установите пакет 2) или реагируйте на нативную ссылку на пакет 3) или иногда вам нужно будет добавить путь к пакету в Podfile, а затем запустить установка модуля - person CR7; 27.04.2020
comment
Привет, спасибо за ваш ответ. Я использовал команду обновления npx react-native для обновления RN. Я тестировал. 3) или иногда вам нужно будет добавить путь к пакету в Podfile, а затем запустить установку pod, это не помогло. Я имею в виду, что добавил этот модуль «BVLinearGradient», :path => «../node_modules/react-native-linear-gradient» в Podfile. - person Ibrahim Yolbir; 27.04.2020
comment
Вы пробовали это обновить: react-native-community.github.io/upgrade- помощник - person CR7; 27.04.2020
comment
Да, я изменил все файлы - person Ibrahim Yolbir; 27.04.2020
comment
Такая же проблема происходит и у меня. С последних нескольких дней боролся с этим, и до сих пор нет решения. - person Jeet; 06.05.2020