Some projects cannot be imported because they already exist in the workspace error in Eclipse

前端 未结 30 2413
予麋鹿
予麋鹿 2020-11-28 01:36

I am trying to import a project that me and my co-worker have been working on.. and keep getting this error after I select-- \"import\" then \"import existing project\" then

相关标签:
30条回答
  • 2020-11-28 02:20

    In my case, I copied one of the projects (say 'Project1') from the workspace and pasted it to the same workspace. After that I modified the name of the pasted project (say to 'Project2'). I could not see it in the repository.

    The main reason was .project file from the new project still had: <name>Project1</name> instead of <name>Project2</name>.

    So, I did following things in order to get the issue fixed:

    1. Cut and paste Project2 outside the workspace
    2. Change .project file to have <name>Project2</name>
    3. Try importing Project2 again.

    It worked for me.

    0 讨论(0)
  • 2020-11-28 02:20

    You have one occult directory named ".metadata" in workspace directory. Close Eclipse, delete ".metadata" and open Eclipse. When eclipse ask you about workspace make sure that ".metadata" isn't in workspace directory and click "ok" button to select default workspace.

    0 讨论(0)
  • 2020-11-28 02:21

    Uncheck the "copy projects into workspace" checkbox, and then click "refresh" button, you will be able to import the project

    0 讨论(0)
  • 2020-11-28 02:21

    It was happened to me when

    I delete project from eclipse Project Explorer and not checked the remove content from disk.

    Next time when I tried to import same project in workspace then got same problem.

    To solve I just did FYI work that every kid can do :)

    So How I solved it:

    1. Cut Ctrl + x myProject folder from eclipse workspace to other location ie Desktop
    2. Right Click Navigator (you can get it from Window > Show View > Navigator) and Refresh (it will prompt following dialog)
    3. Just click Yes button and move your project folder back to eclipse workspace directory
    4. Import again!
    5. Now Rock 'n' Role
    0 讨论(0)
  • 2020-11-28 02:22

    This warning means you just deleted project from navigator, but the project is present in the working set. Or else your working set has project with same name, so go to work-space directory and delete the project which has the same name and import again.

    0 讨论(0)
  • 2020-11-28 02:22

    My problem was a little bit different.

    For example, the project name (what I see) was FooProject and in the imported project, I was looking for the FooProject but I could not. However, Eclipse does not let me import that project because he claims that it is already imported. And then, I have looked at the .project file of the project and I have seen that the actual name of the project was not what I see (FooProject).

    The conclusion; The name of the project (what you see in Eclipse) may be different than the actual name of the project (what maven see). Because of this reason. Please be sure that they are the same name by checking .project file of the project.

    0 讨论(0)
提交回复
热议问题