Eclipse导入工程报错Some projects cannot be imported because they already exist in the workspace 从而无法finish

适用场景:
1、从网上下载了一个与当前workspace里面重名的文件夹A,但已在eclipse中导入文件夹B,A与B重名。【博主为了使A和B文件夹不重名,所以将下载的A文件夹(欲导入)“重命名”】【!这个解决办法是错误的,请看文章~】
2、 第一次导入后,删除工程,没有没有勾选Delete project contents on disk(cannot be undone)

1、在eclipse中导入项目的步骤:
菜单—>import—>Existing Projects Into Workspace

2、但是去报错“ Some projects cannot be imported because they already exist in the workspace”导致无法finish,如图显示:
Eclipse导入工程报错Some projects cannot be imported because they already exist in the workspace 从而无法finish
3、但是在此工作空间下,并没有重名的文件夹,为啥呢?

我突然想起,我要导入的文件是我从网上下载的,下载时的名字就是“j2ee”,我仅仅是下载完成后重命名了一下而已。竟然就天真的认为并没有与其重名的…

其实打开要导入的文件夹下的.project文件看一下发现:
Eclipse导入工程报错Some projects cannot be imported because they already exist in the workspace 从而无法finish
这名字果真未改!!!
在这个工作空间下,可不是有一个重名的嘛~
Eclipse导入工程报错Some projects cannot be imported because they already exist in the workspace 从而无法finish
4、所以将j2eeDynamic 文件夹(要导入的文件夹)下的.project文件修改如下:
Eclipse导入工程报错Some projects cannot be imported because they already exist in the workspace 从而无法finish
5、这才是重命名成功了!

6、可以finish啦~
Eclipse导入工程报错Some projects cannot be imported because they already exist in the workspace 从而无法finish