迦太基构建失败Xcode 12 12A7209构建 [英] Carthage build failed Xcode 12 12A7209 building

查看:185
本文介绍了迦太基构建失败Xcode 12 12A7209构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

迦太基文件内容:

github "SwiftyJSON/SwiftyJSON"

错误:

Build Failed
Task failed with exit code 1:
/usr/bin/xcrun lipo -create /Users/samrezikram/Library/Caches/org.carthage.CarthageKit/DerivedData/12.0_12A7209/SwiftyJSON/5.0.0/Build/Intermediates.noindex/ArchiveIntermediates/SwiftyJSON\ tvOS/IntermediateBuildFilesPath/UninstalledProducts/appletvos/SwiftyJSON.framework/SwiftyJSON /Users/samrezikram/Library/Caches/org.carthage.CarthageKit/DerivedData/12.0_12A7209/SwiftyJSON/5.0.0/Build/Products/Release-appletvsimulator/SwiftyJSON.framework/SwiftyJSON -output /Users/samrezikram/Downloads/CarthageApp/Carthage/Build/tvOS/SwiftyJSON.framework/SwiftyJSON

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/px/jx4gljpj47j06qr7blw6b4w80000gn/T/carthage-xcodebuild.1NVy7o.log

推荐答案

这是迦太基& Xcode 12问题.不幸的是,目前迦太基团队还没有更新来解决这个问题.但是,您可以运行一个Shell脚本来解除对您的阻止.它为我工作.您可以在Carthage github帐户上关注该线程. https://github.com/Carthage/Carthage/issues/3019#issuecomment-665136323

This is a Carthage & Xcode 12 issue. Unfortunately at the moment there is no update from the Carthage team to address this issue. However, there is a shell script you can run to unblock you. It has worked for me. You can follow the thread on the Carthage github account. https://github.com/Carthage/Carthage/issues/3019#issuecomment-665136323

  1. 创建一个shell脚本carthage-build.sh并将其放置在您的Xcode项目中
  1. Create a shell script carthage-build.sh and place it in your Xcode project

#!/usr/bin/env bash

# carthage.sh
# Usage example: ./carthage-build.sh build --platform iOS

set -euo pipefail

xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX)
trap 'rm -f "$xcconfig"' INT TERM HUP EXIT

# For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise
# the build will fail on lipo due to duplicate architectures.
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig
echo 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig

export XCODE_XCCONFIG_FILE="$xcconfig"
carthage "$@"

  1. 从终端运行脚本以更新您的Carthage框架

$ ./carthage-build.sh build --platform iOS

您的框架应该能够更新和编译.

Your frameworks should be able to update and compile.

仅供参考-我没有编写此脚本,功劳归于 https://github.com/rastersize

FYI - I did not write this script, the credit goes to https://github.com/rastersize

请按照此处的主题更新此问题. https://github.com/Carthage/Carthage/issues/3019

Please follow the thread here for updates on this issue. https://github.com/Carthage/Carthage/issues/3019

这篇关于迦太基构建失败Xcode 12 12A7209构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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