Eclipse import project error, overlaps workspace location

后端 未结 9 2187
抹茶落季
抹茶落季 2020-12-09 07:46

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 work         


        
9条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-09 08:20

    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.

提交回复
热议问题