Xcode 11 GM - 错误:访问构建数据库 - 磁盘 I/O 错误 [英] Xcode 11 GM - error: accessing build database - disk I/O error

查看:298
本文介绍了Xcode 11 GM - 错误:访问构建数据库 - 磁盘 I/O 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

仅构建用于发布分发的通用二进制框架"时遇到以下错误.在调试或发布模式下构建非通用"方案时,相同的项目和设置有效.

项目使用Objective-C &Xcode 11 通用 (11A419c).现在,更新到 Xcode 11 GM Seed 2 (11A420a).

<块引用>

错误:访问构建数据库/Users/john.doe/Library/Developer/Xcode/DerivedData/FrameworkSDK-esxhqchxkdevuiapyebthsdscpje/Build/Intermediates.noindex/XCBuildData/build.db":磁盘I/O错误

在脚本中使用以下 build 命令:

xcodebuild -workspace ${PROJECT_NAME}.xcworkspace -scheme ${PROJECT_NAME} -sdk iphonesimulator -configuration ${CONFIGURATION} only_active_arch=no defined_module=yes clean build CONFIGURATION_BUILD_DIR=${BUILD_DIR}/$}CONFIGURATION-iphone模拟器2>&1

尝试了几个步骤:完全清理、pod 更新和

之前它使用旧的 Xcode10.2 xcodebuild.

替代解决方法

不是一个好的修复,因为它使用 Legacy Build System 而不是带有 Xcode 11 的现代系统.

  1. 一种选择是将 Legacy Build SystemShared Project Settings 用于通用框架项目.

  2. 尝试使用未记录的 xcodebuild 参数 -UseModernBuildSystem=NO,但没有奏效.[正在修复命令行,将更新]

相关发布说明:对于 GM-2 种子:2019 年 9 月 16 日发布 Build 11A420a

<块引用>

XCFramework 可以捆绑二进制框架或适用于多个平台的库——包括 iOS 设备、iOS 模拟器、和 Mac Catalyst — 合并成一个可分发的 .xcframework 包您的开发人员可以在他们自己的应用程序中使用.一个.xcframework 包可以添加到 Xcode 目标的链接库中阶段和 Xcode 使用包含的正确平台的版本构建时的框架或库.创建框架是使用 xcodebuild -create-xcframework 从命令行支持.捆绑在 XCFramework 中的框架或库应该使用Build Libraries for Distribution 构建设置设置为 YES.(49948269)

Encountering following error when only building a "Universal Binary Framework" for release distribution. Same project and settings works when building "Non-Universal" scheme in debug or release mode.

Project uses Objective-C & Xcode 11 GM (11A419c). Now, updating to Xcode 11 GM Seed 2 (11A420a).

error: accessing build database "/Users/john.doe/Library/Developer/Xcode/DerivedData/FrameworkSDK-esxhqchxkdevuiapyebthsdscpje/Build/Intermediates.noindex/XCBuildData/build.db": disk I/O error

Using following build command from a script:

xcodebuild -workspace ${PROJECT_NAME}.xcworkspace -scheme ${PROJECT_NAME} -sdk iphonesimulator -configuration ${CONFIGURATION} only_active_arch=no defines_module=yes clean build CONFIGURATION_BUILD_DIR=${BUILD_DIR}/${CONFIGURATION}-iphonesimulator 2>&1

Tried a few steps: Complete clean, pod update and steps mentioned on Related error for Xcode 10 & linked post - Doesn't solve this issue

No Answer on this question:
why error "accessing build database disk I/O error"?

解决方案

Use Command Line Tools for Xcode 11

Ensuring that correct version of Command Line Tools (xcodebuild) is used works with complete clean & building universal framework fresh. And the project is using New Build System (Default). It also worked with Xcode 11 GM - Build 11A419c (seed 1).

Use following command to ensure proper link:

xcodebuild -version
Xcode 11.0
Build version 11A419c

Earlier it was using the old Xcode10.2 xcodebuild.

Alternative workaround(s)

Not a good fix as it usages Legacy Build System instead of modern system with Xcode 11.

  1. One option is to use Legacy Build System with Shared Project Settings when for universal framework projects.

  2. Tried using undocumented xcodebuild parameter -UseModernBuildSystem=NO, it didn't work. [working on command line fix, will update]

Relevant release note: for GM-2 seed: Released September 16, 2019 Build 11A420a

An XCFramework makes it possible to bundle a binary framework or library for multiple platforms —including iOS devices, iOS simulators, and Mac Catalyst — into a single distributable .xcframework bundle that your developers can use within their own applications. An .xcframework bundle can be added to an Xcode target’s Link Libraries phase and Xcode uses the right platform’s version of the included framework or library at build time. Creation of frameworks is supported from the command line using xcodebuild -create-xcframework. Frameworks or libraries bundled in an XCFramework should be built with the Build Libraries for Distribution build setting set to YES. (49948269)

这篇关于Xcode 11 GM - 错误:访问构建数据库 - 磁盘 I/O 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆