简体   繁体   中英

Command /Xcode.app/Contents/Developer/Toolchains/Swift_2.3.xctoolchain/usr/bin/swiftc failed with exit code 1

When I build with Xcode 8.2.1 I received this error:

在此处输入图片说明

Command /Volumes/SSD/Xcode.app/Contents/Developer/Toolchains/Swift_2.3.xctoolchain/usr/bin/swiftc failed with exit code 1

I have cleaned the project, delete derived data, wait for the indexing processing files, close and reopen Xcode, restart computer and nothing.

There is no duplicated files.

Same error happens with other libraries not only Alamofire.

The error begin happening after merge a branch. Keeping in mind that, I have tried go to other old branch where it used to work but it doesn't work anymore, same error.

Any other required information let me know!

Thank you so much.

Steps that I followed to make it work:

  • Delete derived data
  • Delete Pod folder and Podfile.lock
  • Delete inside the project:
    • AppName.xcodeproj/xcuserdata
    • AppName.xcworkspace/xcuserdata
    • AppName.xcworkspace/xcshareddata

Afterwards, pod install and surprisingly it works.

EDIT: Only working with emulator still having the error with the phone.

EDIT2: I redownload Xcode and now works normally. I keep without knowing the reason why brokes but it's now working.

For me this was because i renamed some of the project directories. I had a ton of red files. To solve, I followed these steps: 1. click on the directory in project navigator where many files show as red 2. Under "Identity and Type" in the File Inspector (on the right side), click Containing directory 3. Select the new directories 4. Rebuild - command shift K, command B

My error shows also the information that some file are used twice in the project. However the complete pointed to the same file with the exact same path.

I could resolve it by unchecking the files an recheck it again.

只需清理您的构建,然后键入

cmd + shift + K

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

Related Question Xcode 6.0.1 Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1 Xcode 7 fails with Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1 Error: Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1 XCode - Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1 Error — Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1 Command /Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1 Swift Compiler Error : Command /Applications/Xcode9.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 6 Bridging-header.h causes Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1 Xcode 8.0 Command /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1 Build failed with error Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM