如何解决此错误 Command PhaseScriptExecution failed with a nonzero exit code

Posted

技术标签:

【中文标题】如何解决此错误 Command PhaseScriptExecution failed with a nonzero exit code【英文标题】:how to solve this error Command PhaseScriptExecution failed with a nonzero exit code 【发布时间】:2021-04-12 14:45:52 【问题描述】:

我已经将我的 Mac 更改为 MacBook m1,我的 Xcode V 是 12.4 我的项目在模拟器上正常运行,但在真实设备上却没有我试图删除它对我不起作用的 pods

Command PhaseScriptExecution failed with a nonzero exit code

谢谢

【问题讨论】:

没有更多信息?完整的错误输出是什么? 我添加了截图 @HamadaRaouf 上周遇到了完全相同的事情,也在 M1 上。唯一有效的是在 Rosetta 2 中打开终端,然后进行 Pod 安装。 我已经在 Rosetta 中打开了,但无法使用 ***.com/questions/63391793/… ?但是您现在应该看到“ARCHS[@]: unbound variable” 【参考方案1】:

在项目和 pods 项目的构建设置中的“Excluded Architectures”中添加“arm64”,以在模拟器中运行应用程序。在设备上构建或归档应用时将其删除。

【讨论】:

干得好,兄弟,正如你所解释的那样,它对我有用 "在设备上构建或归档应用程序时将其删除。"我还没有这样做,我的应用在我的手机和 App Store 上运行良好。

以上是关于如何解决此错误 Command PhaseScriptExecution failed with a nonzero exit code的主要内容,如果未能解决你的问题,请参考以下文章

pip Command Not Found – Mac 和 Linux 错误被解决

如何解决Eclipse开发android程序的编译错误:com/android/dx/command/dexer/Main : Unsupported major.minor version 52.0

Phonegap 无法存档,出现此错误“Command / usr / sbin / chown failed with exit code 1”

centos解决bash: service: command not found 错误

解决Azure Web App 500内部服务器错误超时问题并对其进行故障排除

Vim Command-T 插件错误:无法加载 C 扩展