我刚刚更新到 RN v0.62,在 iOS 上运行应用程序给了我以下错误
!] 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 install ,但问题仍然存在。我也做了 pod repo 更新。
原文由 Pritish 发布,翻译遵循 CC BY-SA 4.0 许可协议
对于
React native
0.62 版本所以我想通了
替换 Podfile 中的以下行
和
编辑:
如果您已更新到
React Native
版本 0.63从 iOS 文件夹中删除
Podfile.lock
。做npm i
从 iOS 文件夹打开
podfile
删除所有内容并复制以下内容
将
RNTodo
替换为您自己的项目名称,cd 到终端中的 iOS 文件夹并执行pod install
一切都应该工作此外
RN
0.63 已放弃对 iOS 9 的支持