react-native - 更新 React Native 后安装 pod 时出现问题

标签 react-native cocoapods

我最近尝试将我的 react native 从 0.62 更新到 0.63。

执行此操作后,我通过 cd iOS 进入我的 iOS 文件夹并运行 pod install,执行此操作时,我在终端中收到以下错误消息。

error

error

我试过按照错误提示运行命令 pod repo update ,但这并不能解决问题。

我曾尝试在线搜索错误,但无法找到修复方法。

这是我的个人资料文件。

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

target 'Example' do
  # Pods for Example
  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'

  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 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'

  # React Native Maps dependencies
  rn_maps_path = '../node_modules/react-native-maps'
  pod 'react-native-google-maps', :path => rn_maps_path
  pod 'GoogleMaps'
  pod 'Google-Maps-iOS-Utils'


  pod 'RNCPushNotificationIOS', :path => '../node_modules/@react-native-community/push-notification-ios'

  pod 'RNSound', :path => '../node_modules/react-native-sound'

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

  use_native_modules!
end

target 'Example-tvOS' do
  # Pods for AntrimElimChurch-tvOS

  target 'Example-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end


  target 'OneSignalNotificationServiceExtension' do
    pod 'OneSignal', '>= 2.9.3', '< 3.0'
  end
end

最佳答案

我认为您需要升级 pod 文件,因为从 62 到 63 有很多变化。

这是 RN 63 的示例
https://raw.githubusercontent.com/react-native-community/rn-diff-purge/release/0.63.0-rc.1/RnDiffApp/ios/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, '10.0'

target 'RnDiffApp' do
  config = use_native_modules!

  use_react_native!(:path => config["reactNativePath"])

  target 'RnDiffAppTests' 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 these next few lines.
  use_flipper!
  post_install do |installer|
    flipper_post_install(installer)
  end
end

target 'RnDiffApp-tvOS' do
  # Pods for RnDiffApp-tvOS

  target 'RnDiffApp-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end
end

关于react-native - 更新 React Native 后安装 pod 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62428235/

相关文章:

react-native - 如何使 native 多行 TextInput 在用户输入时自动滚动?

reactjs - 在React中使用requestAnimationFrame

react-native - React Native 是否支持 CSS 网格?

ios - react native 错误 - react-native-xcode.sh : line 45: react-native: command not found Command/bin/sh failed with exit code 127

ios - 从 Cocoapods 安装中删除 -Objc 标志

react-native - react 导航 : change tabNavigator style based on redux store

iOS #include "mupdf/fitz.h"未找到问题

swift3 - 我们的 Xcode 项目中的 podfile.lock 是什么,为什么要使用它?

ios - 获取对等依赖错误 react / react native

swift - cocoa pod 不工作