error: unable to load standard library for target 'arm64-apple-ios10.0-simulator'?

前端 未结 11 1475
广开言路
广开言路 2020-12-16 11:35

I updated my Xcode but not able to build. It\'s failing with:

:0: error: unable to load standard library for target \'arm64-appl

11条回答
  •  余生分开走
    2020-12-16 11:44

    What fixed the issue in my case was clearing the environment. Apparently when running a script build phase in Xcode, there are some environment variables set which may interfere with the resolution of the Swift standard library. I had this issue while performing a carthage build from an Xcode "Run Script" phase.

    Perform a command by clearing the environment with:

    env -i 
    

    You may want to keep the PATH and DEVELOPER_DIR environment variables though, in particular when you have multiple Xcode versions installed.

    so in your case

    env -i DEVELOPER_DIR="$DEVELOPER_DIR" PATH="$PATH" xcodebuild ...
    

提交回复
热议问题