gpt4 book ai didi

ios - Xcode 失败,退出代码为 254

转载 作者:IT王子 更新时间:2023-10-29 05:53:09 26 4
gpt4 key购买 nike

我一直在寻找解决方案,但一无所获。使用 XCode 6 的 beta 3,我的代码不再有效。 Xcode 返回这个错误:

While emitting SIL for 'tableView' at /Users/Marco/Desktop/iPrescription/iPrescription/MedicineTableViewController.swift:109:14 :0: error: unable to execute command: Segmentation fault: 11 :0: error: swift frontend command failed due to signal (use -v to see invocation) Command /Applications/Xcode6-Beta3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift failed with exit code 254

我是 ios 编程的新手,我不知道如何找到这个问题的根源。我很沮丧,因为我不知道在寻找什么。

最佳答案

对我来说也是同样的问题,但在我的案例中是 Collection View 。我发现它是由线引起的:

let cell = collectionView?.dequeueReusableCellWithReuseIdentifier(reuseIdentifier, forIndexPath: indexPath) as CustomCell

我只是把它改成:

let cell = collectionView!.dequeueReusableCellWithReuseIdentifier(reuseIdentifier, forIndexPath: indexPath) as CustomCell

我的应用又恢复了生机。仍然不知道为什么。

更新:

刚刚注意到 beta3 中的方法签名发生了变化,并且 collectionView(在您的情况下为 tableView)被迫解包:

override func collectionView(collectionView: UICollectionView**!**, cellForItemAtIndexPath indexPath: NSIndexPath!) -> UICollectionViewCell!

所以我们需要修复数据源方法,直接使用collectionView或者tableView。

关于ios - Xcode 失败,退出代码为 254,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24629973/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com