我正在尝试导入我和我的同事一直在做的一个项目。在我选择“导入”,然后选择“导入现有项目”,然后单击存档文件,然后单击下一步,这个错误就出现了:

中已经存在某些项目,因此无法导入 工作空间


当前回答

我刚接触Eclipse和Android开发,这让我困扰了很长一段时间。以下是我做错的几件事,也许将来会对别人有所帮助:

I was downloading code examples and assuming project name would be the same as the folder name and was looking for that folder name in the project explorer, not finding it, re-importing it, then getting the error message it already existed in the workspace. Yeah. Not proud of that. Didn't click on 'Copy projects into Workspace' and then searched in vain through the workspace when it didn't appear in the project explorer BECAUSE The 'Add project to working sets' option in the Import Projects tab isn't working as far as I can tell, so was not appearing in the project explorer for the active working set (refresh made no difference). Adding project to the working set had to be done after successfully importing it.

其他回答

我的问题有点不同。

例如,项目名称(我看到的)是FooProject,在导入的项目中,我正在寻找FooProject,但我不能。但是,Eclipse不允许我导入该项目,因为他声称已经导入了该项目。然后,我已经看了项目的。project文件,我已经看到项目的实际名称不是我所看到的(FooProject)。

结论; 项目的名称(您在Eclipse中看到的)可能与项目的实际名称(maven看到的)不同。因为这个原因。请通过检查项目的.project文件确保它们是相同的名称。

这件事发生在我身上

我从eclipse项目资源管理器中删除了项目,并且没有检查 从磁盘中删除内容。

下次当我试图在工作区中导入相同的项目时,又遇到了同样的问题。

为了解决这个问题,我只是做了每个孩子都会做的参考工作:)

所以我是怎么解决的:

从eclipse工作区剪切Ctrl + x myProject文件夹到其他位置,即桌面 右键单击导航器(你可以从窗口>显示视图>导航器)和刷新(它会提示以下对话框) 只需单击Yes按钮并将项目文件夹移回eclipse工作区目录 再导入! 现在是Rock 'n' Role

这是我注意到的上面的问题:-如果checkout文件夹(你的pom项目所在的文件夹)与eclipse工作空间文件夹相同,那么我就会得到这个问题

解决方案

当我使用一个单独的工作空间文件夹来导入项目时,eclipse确实工作得很顺利:)

从eclipse......中删除它你可能已经在eclipse中通过“(右击)—>close project”.....关闭了项目因此,即使您从工作空间文件夹....中删除该项目它在eclipse IDE中作为关闭的项目.....留在那里你应该从Eclipse IDE中删除它!!

如果项目已经从项目导航器中删除,那么右键单击项目导航器,并选择refresh以刷新工作空间。然后重新添加已删除的项目。