Expo SDK 46 iOS 构建在 Pod 安装步骤中失败

问题描述 投票:0回答:4

我正在尝试从 expo 托管项目构建 iOS 应用程序。构建在 Pod 安装步骤失败。

在 Expo SDK 44、45 中一切正常。但是当我升级到 SDK 46 时,我遇到了这个问题。

这是我的package.json

{
  "name": "App1234",
  "version": "1.0.0",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "@expo/vector-icons": "^13.0.0",
    "@openspacelabs/react-native-zoomable-view": "^2.0.4",
    "@react-native-community/datetimepicker": "6.2.0",
    "@react-native-community/netinfo": "9.3.0",
    "@react-native-community/slider": "4.2.3",
    "@react-native-google-signin/google-signin": "^8.1.0",
    "@react-navigation/bottom-tabs": "^6.4.0",
    "@react-navigation/drawer": "^6.5.0",
    "@react-navigation/native": "^6.0.13",
    "@react-navigation/native-stack": "^6.9.0",
    "@react-navigation/stack": "^6.3.2",
    "@stripe/stripe-react-native": "0.13.1",
    "@types/react-native": "~0.69.1",
    "apisauce": "^2.1.6",
    "expo": "~46.0.13",
    "expo-apple-authentication": "^4.3.0",
    "expo-constants": "^13.2.4",
    "expo-document-picker": "^10.3.0",
    "expo-firebase-recaptcha": "^2.3.0",
    "expo-font": "^10.2.1",
    "expo-image-picker": "^13.3.1",
    "expo-linear-gradient": "^11.4.0",
    "expo-linking": "^3.2.2",
    "expo-location": "^14.3.0",
    "expo-notifications": "^0.16.1",
    "expo-secure-store": "^11.3.0",
    "expo-tracking-transparency": "^2.3.1",
    "expo-updates": "^0.14.6",
    "firebase": "9.9.2",
    "formik": "^2.2.9",
    "html-entities": "^2.3.3",
    "lodash": "^4.17.21",
    "lottie-react-native": "5.1.3",
    "mime": "^3.0.0",
    "moment": "^2.29.4",
    "qs": "^6.11.0",
    "react": "18.0.0",
    "react-native": "0.69.6",
    "react-native-draggable-flatlist": "^3.1.2",
    "react-native-fbsdk-next": "^11.0.0",
    "react-native-geocoding": "^0.5.0",
    "react-native-gesture-handler": "~2.5.0",
    "react-native-google-mobile-ads": "^8.2.0",
    "react-native-maps": "0.31.1",
    "react-native-phone-number-input": "^2.1.0",
    "react-native-progress": "^5.0.0",
    "react-native-razorpay": "^2.2.9",
    "react-native-read-more-text": "^1.1.2",
    "react-native-reanimated": "~2.9.1",
    "react-native-safe-area-context": "4.3.1",
    "react-native-screens": "~3.15.0",
    "react-native-svg": "12.3.0",
    "react-native-webview": "11.23.0",
    "react-native-youtube-iframe": "^2.2.2",
    "typescript": "^4.6.3",
    "yup": "^0.32.11"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9"
  },
  "private": true
}

这是安装 Pods 日志

Using Expo modules
Auto-generating `.xcode.env.local` with $NODE_BINARY=/Users/expo/.nvm/versions/node/v16.13.2/bin/node
Adding a custom script phase for Pod RNGoogleMobileAds: [RNGoogleMobileAds] Configuration
Auto-linking React Native modules for target `HomListi`: RNDateTimePicker, RNGestureHandler, RNGoogleMobileAds, RNGoogleSignin, RNReanimated, RNSVG, RNScreens, lottie-react-native, react-native-fbsdk-next, react-native-maps, react-native-netinfo, react-native-razorpay, 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`
[stderr] /Users/expo/workingdir/build/node_modules/react-native-fbsdk-next/react-native-fbsdk-next.podspec:4: warning: already initialized constant Pod::FBSDKVersion
[stderr] /Users/expo/workingdir/build/node_modules/react-native-fbsdk-next/react-native-fbsdk-next.podspec:4: warning: previous definition of FBSDKVersion was here
Adding spec repo `trunk` with CDN `https://cdn.cocoapods.org/`
[!] CocoaPods could not find compatible versions for pod "ExpoAdapterGoogleSignIn":
  In Podfile:
    ExpoAdapterGoogleSignIn (from `../node_modules/@react-native-google-signin/google-signin/ios`)
Specs satisfying the `ExpoAdapterGoogleSignIn (from `../node_modules/@react-native-google-signin/google-signin/ios`)` dependency were found, but they required a higher minimum deployment target.
Error: Compatible versions of some pods could not be resolved.
You are seeing this error because either:
  - Versions in the cached Podfile.lock do not match required values in Podspecs of some installed libraries. To fix this, you can re-run build command with "--clear-cache" option, or select "Clear cache and retry build" on the build page.
  - Some of the pods used in your project depend on different versions of the same pod. See logs for more information.

我使用了“eas build -p ios”命令 还使用了“eas build -p ios --clear-cache”

没用。

任何人都可以帮忙吗?拜托拜托拜托!!!!!

ios react-native expo cocoapods eas
4个回答
8
投票

将您的 Podfile 平台更新至 13:

platform :ios, '13.0'


2
投票

将 Pod 文件(即平台)更新到 13.0 或更高版本。

平台:ios,podfile_properties ['ios.deploymentTarget'] || ‘13.0’


0
投票

尝试降级版本“@react-native-google-signin/google-signin”:“8.0.0”


0
投票

我对版本“@react-native-google-signin/google-signin”有同样的问题:“11.0.0”,我的项目由expo管理,我能够解决这个问题。添加此行 “deploymentTarget”:“13.4” 在此文件的“ios”对象中 root_of_project/app.json

© www.soinside.com 2019 - 2024. All rights reserved.