我使用的是React Native版本0.62.2
,现在我升级到版本0.63.0
,并且在运行npx pod-install
安装Pod软件包后出现此错误:
CocoaPods找不到“ ReactCommon / callinvoker”广告连播的兼容版本:
答案 0 :(得分:5)
实际上,我只是删除了Podfile.lock
并删除了整个Podfile
,并从最新版本的全新安装的React Native
项目中添加了新内容,这意味着其内容应为:
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 '[YourProjectName]' do
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
target '[YourProjectName]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 these next few lines.
use_flipper!
post_install do |installer|
flipper_post_install(installer)
end
end
target '[YourProjectName]-tvOS' do
# Pods for [YourProjectName]-tvOS
target '[YourProjectName]-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
注意:很明显,您应该将项目名称替换为[YourProjectName]
。
提示:如果您使用手动链接,请取消所有链接。我手动链接react-native-vector-icons
之后,在项目的根目录上运行npx pod-install
命令,一切将恢复正常。
答案 1 :(得分:0)
您应该删除argv[argc]
并在ios文件夹中的终端上运行此代码
Podfile.lock