为什么我的Xcode文件之一消失了?

时间:2019-11-19 11:28:57

标签: ios swift xcode compiler-errors

在我从事项目工作时,我发现我再也无法运行我的项目了,因为我遇到了这样的错误:

Build input file cannot be found: '/Users/andreagualandris/Desktop/Xcode Projecs/InstagramClone/InstagramClone/ViewControllers/SignUpViewController.swift'

基本上我的一个ViewController文件已经消失了。我仍然可以看到文件中列出的viewController的名称,但是图标比其他图标更苍白:see here 当您单击它时,系统声音会禁止您单击它。我该如何解决这个问题?

2 个答案:

答案 0 :(得分:3)

  • 在文件上单击鼠标右键,选择 Show in Finder

enter image description here

如果可以在这里找到它:

  • 从左侧面板上的该文件中删除引用

enter image description here


  

再次添加(您需要选择 Copy items if neededCreate groups

enter image description here

答案 1 :(得分:0)

转到“恢复的引用”,然后从此处删除文件,然后使用适当的引用再次添加文件。清理项目并重新构建。enter image description here

相关问题