首页 > 解决方案 > 未能建立活动方案

问题描述

我的SwiftUI项目将不再构建。它告诉我Failed to build active scheme没有更多信息。 在此处输入图像描述

这是完整的存储库: https ://github.com/nathfreder/HackerNews/tree/master/HackerNews

改了之后才发现这个问题

ForEach(0..<10) { _ in
    NavigationButton(destination: Text("")) {
        StoryRow()
    }
}

ForEach(store.stories) { story in
    NavigationButton(destination: Text("")) {
        StoryRow(story: story)
    }
}

标签: iosswiftuiswift5.1

解决方案


如果您注意到,该项目出于某种原因包含 Firebase swift 包,这会导致预览构建失败。Xcode 的 Report navigator 中的实际错误是“'GoogleUtilities/GULLoggerLevel.h' file not found”。

从项目的Swift Packages部分中删除 firebase 包为我消除了错误:

在此处输入图像描述


推荐阅读