Mic*_*ell 17 xcode compiler-errors build
运行Xcode 10并且似乎无法找到有关构建项目时出现的此错误的更多信息.
有想法该怎么解决这个吗?
这是错误之前的最后一行:
Desktop/CheerApp!/ CheerApp!/Assets.xcassets命令CompileAssetCatalog失败并带有非零退出代码 -
扩展:
CompileAssetCatalog /Users/michaelansell/Library/Developer/Xcode/DerivedData/CheerApp!-ehbjnqaldsycfegiviymewkplqhm/Build/Products/Debug-iphonesimulator/CheerApp!.app /Users/michaelansell/Desktop/CheerApp!/CheerApp!/Assets.xcassets(在目标中) :CheerApp!)cd/Users/michaelansell/Desktop/CheerApp!/Applications/Xcode.app/Contents/Developer/usr/bin/actool --output-format human-readable-text --notices --warnings --export-dependency-info/Users/michaelansell/Library/Developer/Xcode/DerivedData/CheerApp!-ehbjnqaldsycfegiviymewkplqhm/Build/Intermediates.noindex/CheerApp!.build/Debug-iphonesimulator/CheerApp!.build/assetcatalog_dependencies --output-partial-info-plist/Users/michaelansell/Library/Developer/Xcode/DerivedData/CheerApp!-ehbjnqaldsycfegiviymewkplqhm/Build/Intermediates.noindex/CheerApp!.build/Debug-iphonesimulator/CheerApp!.build/assetcatalog_generated_info.plist --app-icon AppIcon --compress-pngs --enable-on-demand-resources YES - -optimization space --filter-for-device-model iPhone11,2 --filter-for-device-os-version 12.0 --sticker-pack-identifier-prefix Mike.CheerApp-.sticker-pack.--target-device iphone --target-device ipad --minimum-deployment-target 11.4 --platform iphonesimulator --product-type com.apple.product-type.application --compile/Users/michaelansell/Library/Developer/Xcode中/ DerivedData/CheerApp!-ehbjnqaldsycfegiviymewkplqhm /编译/产品/调试,iphonesimulator /
mar*_*hiz 14
如果您已经打开了多个版本的 Xcode,则可能需要重新启动 Xcode CoreSimulatorService,这是一种邪恶的后台服务,尽管它仅与一个版本兼容,但它以某种方式保持在线并可用于许多版本的 Xcode,并清理相关文件。
就我而言,Xcode 13.2.1、13.4.1 和 14-beta 之间似乎存在兼容性问题。经过几个小时的搜索,以下命令终于将我从重新启动、重新安装和删除 DerivedData 的深渊中拉了出来。
# Make sure the correct version of Xcode is selected
xcode-select -p
# Clear out conflicting devices here, if any
rm -rf ~/Library/Developer/CoreSimulator/Devices
# Trigger the Simulator service to restart
sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
# Clean up Xcode simulator references
xcrun simctl delete unavailable
Run Code Online (Sandbox Code Playgroud)
如果仅此方法不起作用,则可能存在由冲突版本的 Xcode 安装的问题CoreSimulatorService,甚至重新启动也无法解决您的情况。您可以看到该守护进程是从系统上的全局目录运行的,该目录由 Xcode 在首次启动时的安装脚本中初始化:
$ ps aux | grep CoreSimulator
user 13668 0.0 0.0 408883856 17760 ?? S 9:52AM 0:00.05 /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/SimulatorTrampoline.xpc/Contents/MacOS/SimulatorTrampoline
user 13665 0.0 0.0 408765760 25248 ?? S 9:52AM 0:03.20 /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/com.apple.CoreSimulator.CoreSimulatorService.xpc/Contents/MacOS/com.apple.CoreSimulator.CoreSimulatorService
root 2161 0.0 0.0 408612544 10432 ?? Ss 9:29AM 0:06.33 /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Resources/bin/simdiskimaged
user 2158 0.0 0.0 408574240 7088 ?? S 9:29AM 0:00.07 /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/SimLaunchHost.arm64.xpc/Contents/MacOS/SimLaunchHost.arm64
Run Code Online (Sandbox Code Playgroud)
这有点复杂,因为它需要/Library/Developer/在 Xcode 重新启动以替换损坏的版本之前清除该目录。
rm -rf /Library/Developer/**
Run Code Online (Sandbox Code Playgroud)
请注意,您Terminal.app或您用于 shell 的任何内容都需要完整的磁盘访问权限才能执行此操作,如下System Preferences > Security & Privacy > Full Disk Access > [Terminal.app]
重新安装应该在启动所需版本的 Xcode 后启动,但您也可以手动运行其中的安装 pkg 文件来重新执行此安装过程/Application/<Xcode.app>/Contents/Resources/Packages/。
此问题的其他症状:模拟器未显示在Window > Devices and Simulators列表中并simctl抛出错误,并且无法找到类似于以下内容的基本 iOS SDK:
$ xcrun simctl list
...
-- Unavailable: com.apple.CoreSimulator.SimRuntime.iOS-15-5 --
iPhone 8 (55A90310-8202-4A0D-968B-00F440D42210) (Shutdown) (unavailable, runtime profile not found)
Run Code Online (Sandbox Code Playgroud)
也可以看看:
尝试删除然后重新添加您正在使用的一些文件。至少对我来说是这样。
这似乎是 Xcode 10.1 中的一个错误
我发现与启动图像相关的相同错误。
\n\n我的解决方案:
\n\n在主项目设置中转到:
\n\n删除资产目录的链接,并使用 CMD+SHIFT+K 清理构建文件夹。
\n\n瞧\xc3\xa0!
\n\n您可以稍后再次链接。
\n如果您更改从素材资源打开的图像之一,似乎会发生这种情况。以下是一些可行的解决方案:
| 归档时间: |
|
| 查看次数: |
14797 次 |
| 最近记录: |