Xcode 中已存在同名项目

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20301434/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 04:22:03  来源:igfitidea点击:

An item with the same name already exists in Xcode

xcode

提问by Curnelious

I know its been asked already , but this time the solutions are not working for me . I had some framework that was dragged to Xcode without copying it . than i have removed it from desktop , and Xcodeshows error that its missing . (till now ok).

我知道已经有人问过了,但这一次解决方案对我不起作用。我有一些框架被拖到 Xcode 中而不复制它。比我从桌面上删除它,并Xcode显示它丢失的错误。(直到现在还可以)。

So, i have removed the .frameworkof this file, from the frameworks folder in the project. Now i can't add it again, because :

所以,我已经.framework从项目的框架文件夹中删除了这个文件的 。现在我无法再次添加它,因为:

an item with the same name already exists

its not there,i can't find it in the project, and can't add it again.

它不在那里,我在项目中找不到它,也无法再次添加它。

What could i miss here ?

我能在这里错过什么?

采纳答案by user1118321

If you go to the target settings for the target which included it, click on "Build Phases" and twirl open the section labeled "Link Binary With Libraries" you'll probably see it in the list of linked libraries. Simply select the old one and press the "-" button to remove it.

如果您转到包含它的目标的目标设置,请单击“构建阶段”并旋转打开标有“链接二进制与库”的部分,您可能会在链接库列表中看到它。只需选择旧的,然后按“-”按钮将其删除。

回答by Jumpin' Johnny K

Also- Check your project folder. Sometimes your file doesn't get deleted out of that folder even though Xcode is showing that file not there.

另外 - 检查您的项目文件夹。有时即使 Xcode 显示该文件不在那里,您的文件也不会从该文件夹中删除。

回答by keithics

I tried all of the answers above but the only problem is that xcode doesn't delete the folder.

我尝试了上面的所有答案,但唯一的问题是 xcode 不会删除该文件夹。

So make sure the folder is delete in the project directory.

因此,请确保删除项目目录中的文件夹。

回答by Poyu Chen

If you just remove the reference of item, It's not really deleted item from your folder. You could go to the project folder and delete it.

如果您只是删除项目的引用,它并不是真正从您的文件夹中删除的项目。您可以转到项目文件夹并将其删除。

click "remove the reference" and it's not deleted completely

单击“删除引用”并没有完全删除

Go to folder of your project and remove it.

转到项目的文件夹并将其删除。

回答by Ronaldoh1

I've been breaking my head trying to figure out this error. This happens when you delete a file/framework from your Xcode project. Then you try to read and you get that annoying error that the files already exists. Here i what i did.

我一直在努力找出这个错误。当您从 Xcode 项目中删除文件/框架时会发生这种情况。然后你尝试阅读,你会得到文件已经存在的恼人错误。在这里,我做了什么。

  1. I looked to make sure that the frameworks weren't in any of my group folders.
  2. Go to build phases - link binary with Libraries. (You probably won't see your frameworks here here either).
  3. I simply just dragged the frameworks underneath Link Binary With Libraries and it worked -____-
  1. 我想确保框架不在我的任何组文件夹中。
  2. 转到构建阶段 - 将二进制文件与库链接。(您可能也不会在这里看到您的框架)。
  3. 我只是将框架拖到 Link Binary With Libraries 下面,它起作用了 -____-

I didn't do anything else. Magic

我没有做任何其他事情。魔法