如何解决错误显示像文件名使用两次 [英] How to resolve error showing like filename used twice

查看:353
本文介绍了如何解决错误显示像文件名使用两次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Xcode 7.3.1工作。现在我得到错误显示像文件名使用两次,我困扰这个以下错误。

I am working in swift with Xcode 7.3.1. Now i got error showing like file name used twice and i am stuck with this following error.

<unknown>:0: error: no such file or directory: '/Users/mac/Desktop/develop/myApp/Manager.swift'
<unknown>:0: error: filename "Manager.swift" used twice: '/Users/mac/Desktop/develop/myApp/Manager.swift' and '/Users/mac/Desktop/develop/myApp/MyApp/module/Manager.swift'

p>

推荐答案

我有一个非常相似的问题,所以希望这有助于。

I had a very similar issue, so hopefully this helps.

在文本编辑器(我选择Sublime)中打开项目文件( ProjectName.xcodeproj ),然后搜索文件条目( Manager.swift )。如果您在其中找到两个条目,那么请删除一个。如果您不确定是否删除正确的文件,可以删除这两个文件,然后再将文件重新添加到您的项目中。

Open your project file (ProjectName.xcodeproj) in a text editor (I chose Sublime), and then search for the file entry (Manager.swift). If you find two entries for it in there, then delete one. If you are not sure if you will delete the right one, you can delete both and then re-add the file to your project afterwards.

由于您正在编辑项目文件,强烈建议在此之前确保您有一个新的提交,以避免任何可能的数据丢失。

Since you are editing your project file, it is highly recommended to make sure you have a fresh commit prior to this to avoid any potential loss of data.

这篇关于如何解决错误显示像文件名使用两次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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