CocoaPods找不到Pod“ ReactCommon / jscallinvoker”的兼容版本: [英] CocoaPods could not find compatible versions for pod "ReactCommon/jscallinvoker":
问题描述
我刚刚更新到RN v0.62,并且在iOS上运行应用程序后出现以下错误
I just updated to RN v0.62 and running app on iOS gives me following error
!] CocoaPods could not find compatible versions for pod "ReactCommon/jscallinvoker":
In snapshot (Podfile.lock):
ReactCommon/jscallinvoker (from `../node_modules/react-native/ReactCommon`)
In Podfile:
ReactCommon/jscallinvoker (from `../node_modules/react-native/ReactCommon`)
None of your spec sources contain a spec satisfying the dependency: `ReactCommon/jscallinvoker (from `../node_modules/react-native/ReactCommon`)`.
我删除了所有node_modules并做了npm i。我也在iOS目录中安装了Pod,但问题仍然存在。我也做了pod repo更新。
I deleted all node_modules and did npm i. I also did pod install in iOS directory but the issue persists. I also did pod repo update.
推荐答案
对于 React native
0.62版本
所以我弄清楚了
替换Podfile中的下一行
Replace following line in your Podfile
pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
与
pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
编辑:
如果您已更新为 React Native
版本0.63
If you have updated to React Native
version 0.63
从iOS文件夹中删除 Podfile.lock
。
做 npm i
Delete Podfile.lock
from iOS folder.
Do npm i
从iOS文件夹中打开 podfile
Open podfile
from iOS folder
删除所有内容并复制以下内容
Delete everything and copy below contents
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
require_relative '../node_modules/react-native/scripts/react_native_pods'
platform :ios, '10.0'
target 'RNTodo' do
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
target 'RNTodoTests' 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 'RNTodo-tvOS' do
# Pods for RNTodo-tvOS
target 'RNTodo-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
替换具有您自己的项目名称的RNTodo
,在终端中cd到iOS文件夹并进行 pod安装
,一切应该正常工作
Replace RNTodo
with your own project name, cd to iOS folder in the terminal and do pod install
and everything should work
还 RN
0.63不再支持iOS 9
Also RN
0.63 has dropped support for iOS 9
这篇关于CocoaPods找不到Pod“ ReactCommon / jscallinvoker”的兼容版本:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!