Xcode忽略导入 [英] Xcode Ignoring import

查看:101
本文介绍了Xcode忽略导入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了Xcode 11,当我尝试使用SwiftUI选中标记创建新的新项目时,它会返回错误.

I have just installed Xcode 11 and when I try to create new fresh project with the SwiftUI check mark selected it returns an error.

无法成功构建和运行.

文件"ContentView.swift"是模块"SwiftUI"的一部分;忽略导入

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

ContentView.swift

使用未声明类型的视图"

Use of undeclared type 'View'

SceneDelegate.swift

使用未解析的标识符'UIHostingController'

Use of unresolved identifier 'UIHostingController'

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

I have tried removing all derived data and also set command-line tools to 11

推荐答案

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

Your project is named SwiftUI - please try using a different name.

这篇关于Xcode忽略导入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆