Swift compiler segmentation fault when building

后端 未结 30 2648
南旧
南旧 2020-11-29 03:59

Adding a (convenient) computed height property to UIView in my UIViewExtension.swift file is causing the Swift compiler to segfault...

30条回答
  •  情话喂你
    2020-11-29 04:45

    I had this error too, and I fixed it like this:

    Check your project and find out which files are used twice and remove one, or delete and re-add them all.

    Errors in my Xcode:

    :0: error: filename "AttributedString.swift" used twice: '/Users/.../CNJOB/CNJOB/AttributedString.swift' and '/Users/.../CNJOB/CNJOB/AttributedString.swift'

    :0: note: filenames are used to distinguish private declarations with the same name

    :0: error: filename "APIClient.swift" used twice: '/Users/.../CNJOB/CNJOB/APIClient.swift' and '/Users/.../CNJOB/CNJOB/APIClient.swift'

    :0: note: filenames are used to distinguish private declarations with the same name

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

提交回复
热议问题