swift - Xcode忽略导入

标签 swift xcode import

我刚刚安装了 Xcode 11,当我尝试创建新项目并选中 SwiftUI 复选标记时,它返回错误。

无法成功构建和运行。

File 'ContentView.swift' is part of module 'SwiftUI'; ignoring import

ContentView.swift

enter image description here

Use of undeclared type 'View'

SceneDelegate.swift

enter image description here

Use of unresolved identifier 'UIHostingController'

我已经尝试删除所有派生数据并将命令行工具设置为 11

最佳答案

您的项目名为 SwiftUI - 请尝试使用其他名称。

关于swift - Xcode忽略导入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56505797/

相关文章:

swift - 如何在 Swift 中为 NSTextView 设置第一响应者?

ios - 将 PFQueryTableViewCell imageView 设置为本地镜像

ios - Swift 不会生成未使用的变量警告

svn - 将历史从 SVN 导入/导出到 TFS

python - 为什么不鼓励混合使用 'from x import y' 和 'import x'?

swift - 实例成员不能在类类型上使用?

ios - 添加全屏 View 作为 View Controller 的 subview

iphone - 在OBJ-C中将完整字母转换为数字

xcode - 如何在我的项目中嵌入可执行文件

file - 在 SQL Server Management Studio 中导入数据库(SQL 文件)