ld: file not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/

After recently upgrading Xcode 14.3, when executing the repo push command, I encountered an error under main

ld: file not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)

as shown in the picture
Please add a picture description
Please add a picture description
Please add a picture description

But after searching the Internet for a long time, I found that the following sentence is the key
Please add a picture description

The solution is
to enter this path

/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/

If there is no acr file, create one yourself, and download the following .a files, and put them in the arc folder.
Download link link
Please add a picture description

Another thing to note is that this error also reported the following error

xcodebuild: Returned an unsuccessful exit code.

But this sentence is a very general error report, we must patiently scroll up the log, sometimes we have to scroll a lot to find it, we must scroll up, we must scroll up , we must scroll up

Guess you like

Origin blog.csdn.net/LIUXIAOXIAOBO/article/details/130781592