Xcode 10.2.1 Command PhaseScriptExecution failed with a nonzero exit code

前端 未结 25 1059
醉梦人生
醉梦人生 2020-11-28 08:20
Showing Recent Messages:-1: mkdir -p /Users/spritzindia/Library/Developer/Xcode/DerivedData/Contigo-atftiouzrdopcmcpprphpilawwzm/Build/Products/Debug-iphonesimulator         


        
25条回答
  •  广开言路
    2020-11-28 08:59

    Another reason for the error might be is that Xcode is running a script during the run phase.

    If this is the case, you have 2 options:

    1. Delete the script (makes sense if the script is NOT important)

    2. Modify/update the scripts location path (Xcode might not be able to locate the script)

    In my case, the script was important, so I modified/updated its location.

    Originally, the script location path was written like this:

    $SRCROOT/scripts/clean-assets.sh
    

    Because the scripts path contained spaces (I moved the project to a new directory), I changed the path to this:

    "$SRCROOT"/scripts/clean-assets.sh
    

    By adding quotes to SRCROOT, changing it to "$SRCROOT", the error will go away.

提交回复
热议问题