42

I have a big project that I want to import to Eclipse, but everytime I do that I get:

Invalid project description.
  D:\svn\myproject\vr overlaps the workspace location: D:\svn\myproject\vr

I also reinstalled Eclipse, then set my workspace to where the program exists and then I choose to import the project and always get this error.

Anyone has a solution for this? Am I doing something wrong?

Thanks.

Colin D Bennett
  • 11,294
  • 5
  • 49
  • 66
Adrian
  • 19,440
  • 34
  • 112
  • 219
  • Maybe you can try to use another EMPTY directory for your clean workspace. Eclipse doesn't require projects to be IN the workspace directory. – Manuel Selva Jul 06 '11 at 11:52
  • @ Manuel Selva: can you add it as an answer so I can accepted, that was the problem ! – Adrian Jul 06 '11 at 14:36
  • Does your workspace directory itself have a .project directory? That can confuse imports quite a bit. (I don't think this is a normal thing to do; I had a .project file in my workspace due to a command-line copying problem outside eclipse.) I had a problem both with an overlap error and also import won't recurse into subdirectories, so nothing will show up in the list of candidates to import. – James Moore Oct 06 '12 at 18:19
  • I hit this problem by inadvertently opening the project folder as a workspace (partly due to a quirk of the way the UI works). Opening the correct workspace folder did the trick. I also removed the .metadata folder that had been created in my mercurial project. – drevicko Oct 21 '12 at 00:38
  • Possible duplicate of [Eclipse: Error ".. overlaps the location of another project.." when trying to create new project](https://stackoverflow.com/questions/11733089/eclipse-error-overlaps-the-location-of-another-project-when-trying-to-cr) – Jay Elston Apr 08 '19 at 23:01

9 Answers9

40

Use another EMPTY (thus clean) directory for your clean workspace. Eclipse doesn't require projects to be IN the workspace directory.

Manuel Selva
  • 18,554
  • 22
  • 89
  • 134
  • I had the problem, that I selected my project folder to be my workspace. I deleted the project information and selected the parent folder as workspace. Then I was able to import the maven generated eclipse project. – hellectronic Dec 01 '12 at 17:18
  • 3
    Perhaps this answer is true, but does it really mean that Eclipse requires projects (or at least imported projects) to not be in the workspace directory? I wasn't able to "import" a project into its own directory because it was also the workspace directory. – intcreator Nov 02 '15 at 18:45
9

Go to Eclipse preferences. Search for workspaces. Remove the workspace that has the same path as your project. Your workspace should be at least one folder up. Restart Eclipse and import your project.

Example: Invalid project description. C:\Development\workspace\joy overlaps the workspace location: C:\Development\workspace\joy

Remove the \joy workspace and use only C:\Development\workspace\

Good luck.

Rickard Nilsson
  • 254
  • 3
  • 8
8

Check the File .project and look for The Property

<name>NameOfProject</name>

, The Folder that contains the file, must be named equal to NameOfProject...

In other manner, the file .project must be contained in a folder with name NameOfProject

Please rename the folder.

joseluisbz
  • 1,491
  • 1
  • 36
  • 58
7

Eclipse doesn't allow to open a project that the existing workspace is a subfolder or same folder of that project.

I agree that the error says the obvious and does not state the issue.

Solution: Create the workspace in a higher hierarchy than the project folder OR in a complete separated folder.

* Users who are migrating from IDEA might be confused by the workspace notion of Eclipse. Eclipse's workspace notion is targeted at the potential to embed different projects that don't reside in a mutual folder structure. As this might be a logical notion, most projects in a workspace, from my experience, do reside in the same folder structure, hence misses the 80-20 rule.

AlikElzin-kilaka
  • 34,335
  • 35
  • 194
  • 277
1

for me the problem was the following:

I was trying to import a project that already existed in my default workspace. Think about it; you are selecting "import into workspace" but if you look in your files directory, the project is already in your workspace, thus it's overlapping.

Here is what I would recommend:

  • from windows file explorer i moved the entire project outside of the default workspace. now i can import it into the work space.

  • alternatively there is also a few options to import existing code into your workspace ( think its in file --->new project-->android project from existing code , etc etc

Andrew Barber
  • 39,603
  • 20
  • 94
  • 123
j2emanue
  • 60,549
  • 65
  • 286
  • 456
1

I encountered this same problem:

  • I had a project directory called "demo1".
  • I created a new workspace using that same "demo1" directory as the workspace root directory.
  • When I went to import that project directory (which was the same as my root workspace directory), I got the "overlaps the workspace" error.

I'm using "Eclipse IDE for C/C++ Developers, Version: Indigo Service Release 2"

My solution:

  • Exit Eclipse
  • Delete the .metadata directory (this is created each time you start Eclipse) from inside my workspace directory ("demo1").
  • Create a new directory called "demo1" within the existing "demo1" directory. So now I have "demo1/demo1".
  • Move all the existing files and directories in my existing project, plus the .cproject and .project files (and the .settings directory if it exists), into that new "demo1" subdirectory.
  • Restart Eclipse, and select the original "demo1" directory as my workspace.
  • Go to File->Import, select "General" and "Existing projects into workspace". Click Next.
  • Select the new "demo1" subdirectory as the project I wanted to import into my workspace.
  • Make sure "Copy projects into workspace" is not checked.
  • Click Finish, and it worked. Project builds.

FYI.

Eclipse creates a .metadata directory, a .cproject file, and a .project file (and sometimes a .settings directory). You need the .cproject and .project file, and the .settings directory if it exists. The .metadata directory is a temporary directory which Eclipse creates or updates each time it is opened. It can be deleted without any effect.

kermit
  • 1,621
  • 1
  • 14
  • 14
1

I came upon this today but did not see any answers here that addressed my particular issue. I had copied the contents of my project directly into the workspace (e.g. the src, res, Manifest, etc). You must put your project files into a directory of their own (look in .project and see the exact naming). Create your project directory and move your files into it and you can now import your project into the workspace.

Matt K
  • 6,620
  • 3
  • 38
  • 60
1

From what ever root you have, keep your workspace folder separate from your code folder. So maybe:

C:\code\...
C:\workspace\

Like Ghostbusters, don't let the streams cross.

Norman Skinner
  • 6,729
  • 1
  • 19
  • 22
-1

What I did to solve the problem:

  1. Rename the Project.

    • For example, the issue was with "C:\NividousCode\Production_Daily_HealtchCheck" (Eclipse returned error that this overlaps with another project - which was true I did have another project in another directory called "C:\cjaphe\Production_Daily_HealtchCheck")
  2. Solution was to "C:\NividousCode\Production_Daily_HealtchCheck" to "C:\NividousCode\Production_Daily_HealtchCheck_TEMP"

When I the projected, Eclipse did not complain! and worked!

Markus
  • 3,225
  • 6
  • 35
  • 47