gpt4 book ai didi

ios - Carthage 构建失败 Xcode 12 12A7209 构建

转载 作者:行者123 更新时间:2023-12-01 16:11:11 25 4
gpt4 key购买 nike

迦太基文件内容:

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

最佳答案

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

  • 创建一个shell脚本carthage-build.sh并将其放入您的 Xcode 项目
  • #!/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 "$@"
  • 从终端运行脚本以更新 Carthage 框架
  • $ ./carthage-build.sh build --platform iOS
    您的框架应该能够更新和编译。
    仅供引用 - 我没有写这个脚本,归功于 https://github.com/rastersize
    请关注此处的线程以获取有关此问题的更新。
    https://github.com/Carthage/Carthage/issues/3019

    关于ios - Carthage 构建失败 Xcode 12 12A7209 构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63978083/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com