xcode - 为什么我的 RN 61 IOS 在 AppCenter 中构建构建失败?

标签 xcode react-native cocoapods visual-studio-app-center

我有一个 RN 0.61.2 应用程序,过去已在应用程序中心成功构建 >55,但目前无法在 AppCenter 中构建。我不断收到错误消息,提示找不到 Pod 文件。

我尝试过运行 Pod Install。删除所有 Pod,然后重新安装。 这是我的 Pod 文件的示例

platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

target 'ABAPortal' do
  pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
  pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
  pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
  pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/react-native/'
  pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
  pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
 // Sample from my Pod File
end

我的一些错误。所有这些都与我的 podfile 相关联。

[command]/usr/bin/xcodebuild -workspace /Users/vsts/agent/2.158.0/work/1/s/ios/ABAPortal.xcworkspace -scheme ABAPortal archive -archivePath /Users/vsts/agent/2.158.0/work/1/output/build/archive/ABAPortal CODE_SIGN_STYLE=Manual
User defaults from command line:
    IDEArchivePathOverride = /Users/vsts/agent/2.158.0/work/1/output/build/archive/ABAPortal

Build settings from command line:
    CODE_SIGN_STYLE = Manual

note: Using new build system
note: Planning build
note: Constructing build description
Build system information
error: /Users/vsts/agent/2.158.0/work/1/s/ios/Pods/Target Support Files/boost-for-react-native/boost-for-react-native.xcconfig: unable to open file (in target "boost-for-react-native" in project "Pods") (in target 'boost-for-react-native')

Build system information
error: /Users/vsts/agent/2.158.0/work/1/s/ios/Pods/Target Support Files/FBLazyVector/FBLazyVector.xcconfig: unable to open file (in target "FBLazyVector" in project "Pods") (in target 'FBLazyVector')

编辑以防其他人遇到此问题。如果您的项目中已有 Pod 文件夹。 AppCenter 将不会运行 pod install。所以你可能会遇到问题。

最佳答案

AppCenter 将像往常一样执行 pod install命令,但这只有在删除 ios/Pods 时才有效。由于最新的 RN 版本(未被 git 忽略),文件夹已经存在。

我们的团队必须这样做:

  • 删除 ios/Pods gitignore 文件中的行(自 RN 0.61 起 git-ignored)。
  • 删除 ios/Pods文件夹。
  • 提交
  • 重新添加ios/Pods在 gitignore 文件中
  • 提交
  • AppCenter 的构建将正常运行

注意:从分支切换时本地也必须执行此步骤 RN<0.61RN>0.61 .

希望对你有帮助

关于xcode - 为什么我的 RN 61 IOS 在 AppCenter 中构建构建失败?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58377446/

相关文章:

ios - 如何识别错误/警告是否是使用 swiftlint 规则创建的

ios - UIview Demo 只在一个方向旋转

xcode - 无法找到 Xcode 项目

ios - 使用未声明的类型 'UIWindowScene'

仅从 2018 年 7 月开始的 iOS 11 应用程序

iOS:<未知>:0:错误:未知参数: '-enable-batch-mode' 命令 CompileSwiftSources 失败,退出代码非零

reactjs - 无法将 CSS 文件导入 React 项目

react-native - React Redux 的 useSelector 不更新 expo react-native 上的商店状态

javascript - react native TypeError : Attempted to assign to readonly property

swift - 包含一个带有 cocoapod 规范的 xyz.framework 文件