myeclipse无法导入项目

MyEclipse无法导入Java项目时常遇到的两种情况:

1、Some projects cannot be imported because they already exist in the workspace

2、Some projects were hidden because they exist in the workspace directory
原因:workspace中已经存在了相同名字的项目,所以不能导入。
解决:
1、修改项目名:右击--- refactor --- rename 或 F2

2、打开项目中.project文件 --- 修改<name>projectName</name>

3、工作空间并不存在同名项目,定是还有地方记录了之前的工程信息,可能是。。。找到:xxxxxxxxworkspace.metadata.pluginsorg.eclipse.core.resources.projects 文件夹,删除同名文件夹。

上面情况解决了还存在这个情况:当导入maven工程时说工程名报下面问题:

Project xxx already exists

 Add a version or custom suffix using "Name template" in "Advanced" settings

解决方法:

You can use the "Advanced" option at bottom of import window, "Name template" select "[artifactId]-[version]",

"Profiles" fill the project name and version, eg:helloWord-0.0.1-SNAPSHOT

参考:http://blog.csdn.net/albertfly/article/details/51942431

原文地址:https://www.cnblogs.com/chafe/p/6757398.html