Xcode 构建失败并且重复需要安装命令行开发人员工具

hos*_*nmi 5 xcode command-line-tool ios flutter xcode-command-line-tools

我已将 Xcode 更新到版本 13.4.1 (13F100),\n然后尝试运行 flutter 项目

\n
Launching lib/main.dart on iPhone SE (3rd generation) in debug mode...\nXcode build done.                                            2.9s\nFailed to build iOS app\nError output from Xcode build:\n\xe2\x86\xb3\n    2022-06-11 12:51:51.546 xcodebuild[45221:416597] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore\n    2022-06-11 12:51:51.547 xcodebuild[45221:416597] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore\n    2022-06-11 12:51:51.625 xcodebuild[45221:416597] [MT] DVTPlugInExtensionFaulting: Failed to fire fault for extension (null): (null)\n    2022-06-11 12:51:51.628 xcodebuild[45221:416597] [MT] DVTPlugInExtensionFaulting: Failed to fire fault for extension (null): (null)\n    ** BUILD FAILED **\nXcode\'s output:\n\xe2\x86\xb3\n    Writing result bundle at path:\n        /var/folders/l6/zr2yb4p1787b1cbhjdn2ltvr0000gn/T/flutter_tools.tQVcwl/flutter_ios_build_temp_dirmZJ1FK/temporary_xcresult_bundle\n    note: Using new build system\n    note: Planning\n    note: Build preparation complete\n    note: Building targets in dependency order\n    error: failed to read asset tags: The command `(cd /Volumes/Code/Git/svg/ios && /usr/bin/actool --print-asset-tag-combinations --output-format xml1 /Volumes/Code/Git/svg/ios/Runner/Assets.xcassets)` exited with status 72. The command\'s standard error was:\n    actool: error: Failed to locate \'actool\'.\n    xcode-select: Failed to locate \'actool\', requesting installation of command line developer tools.\n     (in target \'Runner\' from project \'Runner\')\n    Result bundle written to path:\n        /var/folders/l6/zr2yb4p1787b1cbhjdn2ltvr0000gn/T/flutter_tools.tQVcwl/flutter_ios_build_temp_dirmZJ1FK/temporary_xcresult_bundle\nError (Xcode): failed to read asset tags: The command `(cd /Volumes/Code/Git/svg/ios && /usr/bin/actool --print-asset-tag-combinations --output-format xml1 /Volumes/Code/Git/svg/ios/Runner/Assets.xcassets)` exited with status 72. The command\'s standard error was:\n\nactool: error: Failed to locate \'actool\'.\nxcode-select: Failed to locate \'actool\', requesting installation of command line developer tools.\nCould not build the application for the simulator.\nError launching application on iPhone SE (3rd generation).\nExited\n
Run Code Online (Sandbox Code Playgroud)\n

有警报

\n
\n

“atool”命令需要命令行开发人员工具。\n您想立即安装这些工具吗?

\n
\n

在此输入图像描述\n如果我从 Xcode 运行它,它会给我这个错误:

\n
Showing All Messages\nfailed to read asset tags: The command `(cd /Volumes/Code/Git/svg/ios && /usr/bin/actool --print-asset-tag-combinations --output-format xml1 /Volumes/Code/Git/svg/ios/Runner/Assets.xcassets)` exited with status 72. The command\'s standard error was:\n\nactool: error: Failed to locate \'actool\'.\nxcode-select: Failed to locate \'actool\', requesting installation of command line developer tools.\n
Run Code Online (Sandbox Code Playgroud)\n

即使我按下“安装”按钮,这种情况也会重复发生。

\n

小智 9

这里有同样的问题,但是用 git 而不是actool. 另一位同事也刚刚得到了这个,但是clang……苹果公司到底发生了什么?

刚刚解决的问题实际上是打开 xcode 并让它在那里运行安装程序,而不是允许自动弹出窗口继续“安装”,然后在几分钟内再次询问。