Xcode 6 Beta 5 Swift错误:类存在于libswift_stdlib_core.dylib和libswiftCore.dylib中。哪一个未定义

时间:2022-06-19 21:59:35

So I am having an interesting error which didn't exist in the previous Xcode Beta version. It pops up at runtime from this code: (Line 5 to be exact)

所以我有一个有趣的错误,这在以前的Xcode Beta版本中是不存在的。它在运行时从这段代码弹出:(确切地说是第5行)

func removeDuplicates(urls: [NSString]) -> [NSString]{
    var newURLs = [urls[0]]
    for var i = 0; i < urls.count; i++ {
        for var j = 0; j < newURLs.count; j++ {
            if urls[i].isEqualToString(newURLs[j]) {
                if j == newURLs.count-1 {
                    newURLs.append(urls[i])
                }
            } else {
                j = newURLs.count
            }
        }
    }
    println(newURLs.debugDescription)
    return newURLs
}

The errors are as follows:

错误如下:

objc[322]: Class _NSSwiftEnumeratorBase is implemented in both "MyAppFilePath.app"/Frameworks/libswift_stdlib_core.dylib and "MyAppFilePath.app"/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.

objc [322]:类_NSSwiftEnumeratorBase在“MyAppFilePath.app”/Frameworks/libswift_stdlib_core.dylib和“MyAppFilePath.app”/Frameworks/libswiftCore.dylib中实现。将使用两者之一。哪一个未定义。

There are about two dozen of those for different swift classes.

对于不同的快速课程,大约有二十几个。

As I said there was not a problem here until I changed versions, I know some syntax changed but nothing in the release notes really pointed to such a thing.

正如我所说,在我更改版本之前没有问题,我知道一些语法已经改变,但发行说明中没有任何内容真正指向这样的事情。

1 个解决方案

#1


11  

Had the same issue, doing a Clean (Shift+Cmd+K) resolved it for me.

有同样的问题,做一个Clean(Shift + Cmd + K)为我解决了它。

#1


11  

Had the same issue, doing a Clean (Shift+Cmd+K) resolved it for me.

有同样的问题,做一个Clean(Shift + Cmd + K)为我解决了它。