gpt4 book ai didi

ios - xcodebuild存档失败:选择错误的SDK?

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

我正在使用faSTLane发布应用程序。用于构建应用程序的xcodebuild命令的简化版本是这样的:

xcodebuild -workspace App.xcworkspace -scheme App 
-configuration Release -sdk iphoneos13.6
-destination 'generic/platform=iOS' clean archive
这无法给出(添加示例):
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:807:2: error: Unsupported architecture
#error Unsupported architecture
^
In file included from /Users/sudeepkumar/Zendrive/mobile-apps/ios/copilot/Pods/glog/src/symbolize.cc:55:
In file included from /Users/sudeepkumar/Zendrive/mobile-apps/ios/copilot/Pods/glog/src/utilities.h:73:
In file included from /Users/sudeepkumar/Zendrive/mobile-apps/ios/copilot/Pods/glog/src/base/mutex.h:141:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/pthread.h:55:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:33:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported
#error architecture not supported
^
我看到它正在选择MacOSX.sdk,我希望它会选择Xcode目录中存在的iPhoneOS sdk。这是失败的原因吗?或者是其他东西?
xcrun输出:
» xcrun --show-sdk-platform-path
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform

» xcrun --sdk iphoneos --show-sdk-platform-path
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform

最佳答案

Xcode正在/Library/CommandLineTools中使用SDK。相反,它应该在Xcode应用程序内部使用它们。跑

 xcode-select -r
要么
xcode-select -s "/Applications/Xcode.app/Contents/Developer"
验证人
xcode-select -p
其中一些可能需要 sudo

关于ios - xcodebuild存档失败:选择错误的SDK?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63627237/

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