我试图建立从expo 管理的项目iOS应用程序(模拟器).在Pod安装步骤中,构建失败.

在expo SDK 44中,一切都很好.但当我升级到SDK 45甚至46时,我就面临着这个问题.

以下是来自EXPO服务器的一些日志(log):

Run Expo Doctor

Running "expo doctor"
- Finding all copies of expo-modules-autolinking
- Finding all copies of @expo/config-plugins
[stderr] 
[02:48:23] Expected package @expo/config-plugins@^5.0.0
[stderr] 
[02:48:23] Found invalid:
[stderr] 
[02:48:23]   @expo/config-plugins@4.1.5
[stderr] 
[02:48:23]   (for more info, run: npm why @expo/config-plugins)
- Finding all copies of @expo/prebuild-config
- Finding all copies of @unimodules/core
- Finding all copies of @unimodules/react-native-adapter
- Finding all copies of react-native-unimodules
[stderr] 
[02:48:28] Some dependencies are incompatible with the installed expo package version:
[stderr] 
[02:48:28]  - react - expected version: 18.0.0 - actual version installed: 17.0.2
[stderr] 
[02:48:28]  - react-dom - expected version: 18.0.0 - actual version installed: 17.0.2
[stderr] 
[02:48:28]  - react-native - expected version: 0.69.4 - actual version installed: 0.68.2
[stderr] 
[02:48:28] Your project may not work correctly until you install the correct versions of the packages.
[stderr] 
To install the correct versions of these packages, please run: expo doctor --fix-dependencies,
[stderr] 
or install individual packages by running expo install [package-name ...]
[stderr] 
[02:48:31] Warning: Invalid version react-native@0.68.2 for expo sdkVersion 46.0.0. Use react-native@0.69.4
Command "expo doctor" failed.
bash exited with non-zero code: 1

Install Pods

Installing pods
Using Expo modules
Auto-generating `.xcode.env.local` with $NODE_BINARY=/Users/expo/.nvm/versions/node/v16.13.2/bin/node
Auto-linking React Native modules for target `Classima`: RNDateTimePicker, RNGestureHandler, RNReanimated, RNSVG, RNScreens, lottie-react-native, react-native-maps, react-native-netinfo, react-native-safe-area-context, react-native-slider, react-native-webview, and stripe-react-native
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
[Codegen] Found FBReactNativeSpec
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Adding spec repo `trunk` with CDN `https://cdn.cocoapods.org/`
[!] CocoaPods could not find compatible versions for pod "RCT-Folly":
  In snapshot (Podfile.lock):
    RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
  In Podfile:
    RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
It seems like you've changed the version of the dependency `RCT-Folly` and it differs from the version stored in `Pods/Local Podspecs`.
You should run `pod update RCT-Folly --no-repo-update` to apply changes made locally.
Error: Compatible versions of some pods could not be resolved.
You are seeing this error because either:
 - Versions in the Podfile.lock cached by EAS do not match required values for some of the libraries, it can be triggered when upgrading Expo SDK or any other library with native code. To fix that add the "cache.key" field (it can be set to any value) in the build profile in eas.json to invalidate the cache.
 - Some of your npm packages have native code that depend on different versions of the same pod. Please see logs for more info.

Fail Build

Build failed: Compatible versions of some pods could not be resolved.
You are seeing this error because either:
  - Versions in the Podfile.lock cached by EAS do not match required values for some of the libraries, it can be triggered when upgrading Expo SDK or any other library with native code. To fix that add the "cache.key" field (it can be set to any value) in the build profile in eas.json to invalidate the cache.
  - Some of your npm packages have native code that depend on different versions of the same pod. Please see logs for more info.

推荐答案

eas构建-p ios——清除缓存

Ios相关问答推荐

在SwiftUI中动态隐藏列表的空部分

如何让3张组合的`SF Symbol`图片围绕一个特定点旋转?

如何在 SwiftUI 视图中显示协议视图?

Apollo iOS 客户端代码生成:错误:无法查询字段

SwiftUI withAnimation 在视图出现之前不会启动

如何仅更改一个视图的导航标题 colored颜色 ?

通过 tuist/XcodeProj 以编程方式将文件添加到本机目标

如何在不同设备的segment控制中管理文本大小(text size)?

如何避免任何绑定空错误并更好地获取代码

-1103 错误域=NSURLErrorDomain 代码=-1103资源超过最大大小iOS 13

如何快速设置条形按钮的图像?

SwiftUI NavigationLink 立即加载目标视图,无需单击

Xcode 6 App Store 提交失败并显示您的帐户已经拥有有效的 iOS 分发证书

通过touch 传递到下面的 UIViews

UIView 和 initWithFrame 以及一个 NIB 文件.如何加载 NIB 文件?

使用未知类型创建图像格式是一个错误与 UIImagePickerController

所有小部件的Flutter 填充?

iOS UITextView 或 UILabel 带有可点击的动作链接

如何找到 UILabel 的实际行数?

为什么我需要@1x、@2x 和@3x iOS 图像?