更新React Native之后安装Pod时出现问题 [英] Problem when installing pods after updating React Native

查看:66
本文介绍了更新React Native之后安装Pod时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近尝试将我的本机反应从0.62更新到0.63.

I have recently tried updating my react native from 0.62 to 0.63.

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

After doing this I went into my iOS folder via cd iOS and ran pod install, when doing this I get the following error message in my terminal.

我已尝试运行命令pod repo update,如错误所述,但这不能解决问题.

I have tried running the command pod repo update as the error says but this doesn't fix the problem.

我已经尝试过在线搜索错误,但是找不到修复程序.

I have tried searching the error online but am unable to find a fix.

这是我的个人资料文件.

Here is my profile file.

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的更改很多.

I think you need to upgrade pod file as there are lots of changes from 62 to 63.

以下是RN 63的样品 https://raw.githubusercontent.com/react-native-community/rn-diff-purge/release/0.63.0-rc.1/RnDiffApp/ios/Podfile

Here is sample for 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之后安装Pod时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆