SwiftUI开发:解决方法在Xcode中出现“Select a scheme that builds a target which..”

Posted 方舟aark

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SwiftUI开发:解决方法在Xcode中出现“Select a scheme that builds a target which..”相关的知识,希望对你有一定的参考价值。

我在进行苹果app开发的时候,误使用清理垃圾app使得我的canvas画布无法更新。错误为:

NoBuildableEntriesError: active scheme does not build this file

Select a scheme that builds a target which contains the current file,
or add this file to a target that is built by the current scheme.

如何解决这个棘手的问题,我查找了外网,终于找到解决方法。

温馨贴士:使用时请将Xcode完全关闭,然后使用终端运行以下代码:

rm -rf ~/Library/Developer/Xcode/DerivedData

以上是关于SwiftUI开发:解决方法在Xcode中出现“Select a scheme that builds a target which..”的主要内容,如果未能解决你的问题,请参考以下文章