xcode12报错“Command PhaseScriptExecution failed with a nonzero exit code”

报错如下:

xxx/Pods/Target Support Files/Pods-xxx/Pods-xxx-frameworks.sh: line 128: ARCHS[@]: unbound variable Command PhaseScriptExecution failed with a nonzero exit code

或者
The linked library is missing one or more architectures required by this target

两者是同一类问题,应该还涉及架构层面。

解决方法

在Target-Build Settings-Excluded Architectures中添加以下代码
EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64=arm64 arm64e armv7 armv7s armv6 armv8 EXCLUDED_ARCHS=$(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT))

如下即可


图片.png

你可能感兴趣的:(xcode12报错“Command PhaseScriptExecution failed with a nonzero exit code”)