我刚刚安装了 Xcode 11,当我尝试创建新项目并选中 SwiftUI 复选标记时,它返回错误。
无法成功构建和运行。
File 'ContentView.swift' is part of module 'SwiftUI'; ignoring import
ContentView.swift
Use of undeclared type 'View'
SceneDelegate.swift
Use of unresolved identifier 'UIHostingController'
我已经尝试删除所有派生数据并将命令行工具设置为 11
最佳答案
您的项目名为 SwiftUI
- 请尝试使用其他名称。
关于swift - Xcode忽略导入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56505797/