在xcode中移动文件时出错

时间:2015-08-29 07:21:37

标签: xcode swift

我在Xcode上提出了申请。我在另一个文件夹中移动我的文件时出错了,现在出现了这个错误:

<unknown>:0: error: no such file or directory: '/Users/coeimac1/Desktop/learning 5535512147/UserLoginandRegistration/UserLoginandRegistration/UserLoginandRegistration/ViewAlbum.swift'
<unknown>:0: error: no such file or directory: '/Users/coeimac1/Desktop/learning 5535512147/UserLoginandRegistration/UserLoginandRegistration/UserLoginandRegistration/homePage.swift'
<unknown>:0: error: no such file or directory: '/Users/coeimac1/Desktop/learning 5535512147/UserLoginandRegistration/UserLoginandRegistration/UserLoginandRegistration/MasterTableViewController.swift'
<unknown>:0: error: no such file or directory: '/Users/coeimac1/Desktop/learning 5535512147/UserLoginandRegistration/UserLoginandRegistration/UserLoginandRegistration/AddViewController.swift'
<unknown>:0: error: no such file or directory: '/Users/coeimac1/Desktop/learning 5535512147/UserLoginandRegistration/UserLoginandRegistration/UserLoginandRegistration/MedecineDetails.swift'
<unknown>:0: error: no such file or directory: '/Users/coeimac1/Desktop/learning 5535512147/UserLoginandRegistration/UserLoginandRegistration/UserLoginandRegistration/Medecine.swift'
<unknown>:0: error: no such file or directory: '/Users/coeimac1/Desktop/learning 5535512147/UserLoginandRegistration/UserLoginandRegistration/UserLoginandRegistration/LoginViewController.swift'
<unknown>:0: error: no such file or directory: '/Users/coeimac1/Desktop/learning 5535512147/UserLoginandRegistration/UserLoginandRegistration/UserLoginandRegistration/RegisterViewController.swift'
<unknown>:0: error: no such file or directory: '/Users/coeimac1/Desktop/learning 5535512147/UserLoginandRegistration/UserLoginandRegistration/UserLoginandRegistration/AppDelegate.swift'
<unknown>:0: error: no such file or directory: '/Users/coeimac1/Desktop/learning 5535512147/UserLoginandRegistration/UserLoginandRegistration/UserLoginandRegistration/DetailViewController.swift'
<unknown>:0: error: no such file or directory: '/Users/coeimac1/Desktop/learning 5535512147/UserLoginandRegistration/UserLoginandRegistration/UserLoginandRegistration/ViewPhoto.swift'
<unknown>:0: error: no such file or directory: '/Users/coeimac1/Desktop/learning 5535512147/UserLoginandRegistration/UserLoginandRegistration/UserLoginandRegistration/MedecineTableView.swift'
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1

我删除了正确文件夹中的所有文件,但它仍然无法正常工作。我不明白为什么它找不到实际位于错误中指示位置的我的文件。

我在产品中的文件(.app.xctest)显示为红色。

你知道我怎么解决这个问题吗?

2 个答案:

答案 0 :(得分:9)

将文件从目录移动到另一个目录可能会更改其路径。因此,快速解决此问题的方法是从Project navigator视图中选择文件,然后从File inspector中选择Location设置为Relative to Project

enter image description here

答案 1 :(得分:2)

我已解决了在构建设置和存储库中添加源文件的问题。 uncommitted change

要解决:点按未追踪的文件 - &gt;左侧Xcode导航栏上的打开文件检查器 - &gt;在底部点击添加! 结果你会看到我们在GIT中添加文件的最后一张图片。

enter image description here