Eclipse “Invalid Project Description” when creating new project from existing source

前端 未结 21 1080
被撕碎了的回忆
被撕碎了的回忆 2020-12-04 05:35

I am trying to create a new project from existing source code. I keep getting the following error: \"Invalid Project Description\", project path \"overlaps the location of a

相关标签:
21条回答
  • 2020-12-04 06:09

    I have struggled with this issue myself for a while and I think the reason it happens is because (for Android) there are two ways to import projects into the workspace

    1) File>Import>General>Existing Project into Workspace
    2) File>Import>Android>Existing Code into Workspace

    The errors described here are related to method 2).

    For method 1) there will be no overlap problems as long as you uncheck the "Copy Projects into Workspace" box if the project is already in the workspace.

    Edit: There is a third method that wasn't in my original post.

    3) File >New>Other>Android>Existing Android Project into Workspace

    0 讨论(0)
  • 2020-12-04 06:09

    Today I accidentally solved the issue:

    Below 2 steps may not be involved but not sure:

    1. Call from (Eclipse menu)* "/Window/Android SDK Manager" and update a) "Android SDK Tools" b) "Android SDK Platform-tools" packages
    2. Call from Eclipse menu "/Help/Check for Updates" and update Eclipse. Restart Eclipse.

    Steps below are necessary:

    1. From eclipse menu "/File/Import/Android/Existing Android Code Into Workspace"
    2. Browse and select problematic project/or problematic projectS parent directory.
    3. Check "Copy projects into workspace".
    4. Check "Add projects into working sets".
    5. Press finish.

    6. [Optional scenario]: If project(s) and their containing folders have been renamed with the fully qualified package names then simply click on project node parent (where you see project package name instead of project's old name) in Eclipse and rename project with old name. Eclipse will rename folder too.

    P.S. Tested on Eclipse Juno.

    Edit: Many times have passed since this answer and new Eclipse and Android SDK arrived. They have no much more problems during importing existing projects. The only thing one has to consider before importing is to move project folders(those ones one is willing to import) outside of eclipse workspace dir and then check checkboxes ("copy projects into working sets", "add projects into wokring sets") in import wizard dialog. Also I recommend doing this with latest Android SDK because it no more imports projects with dummy names and does not rename folders as it did in some custom cases.

    0 讨论(0)
  • 2020-12-04 06:09

    paste the project source and support libs to any other newly created folder and try to import from there. It worked for me.

    0 讨论(0)
  • 2020-12-04 06:09

    Go to the .project file of your project make sure it display the same name as displayed in project folder. if not change the name. it will work.

    0 讨论(0)
  • 2020-12-04 06:11

    Suppose you have something like:


    /prj/workspace/prj1
    /prj/workspace/prj2


    And your eclipse workspace is in /prj/workspace level (i.e. /prj/workspace/.metadata). If you're having problem importing prj1 and prj2, you can either move your .metadata somewhere else (/prj/.metadata, /prj/eclipse/.metadata, etc.) or create a sub level in workspace so that it looks like:
    /prj/workspace/android/prj1
    /prj/workspace/android/prj2


    And import prj1 and prj2 again. In another word: as long as prj1, prj2, and .metadata are not in the same level it will be fine.

    0 讨论(0)
  • 2020-12-04 06:14

    There are a variety of scenarios, but, in my case, I wanted to retain the folder and it's contents, as it had been checked out from .git. However, I needed to be able to modify the source and other stuff using Eclipse.

    I found the problem was that the .cproject and .project files had path information that was very environment specific (and did not match my environment).

    What I did was this:

    1. Created a new empty folder(with a different name) and created a new workspace pointing to that folder.
    2. Checked out or copied the .git project/folder into the empty folder.
    3. Then imported, General, Existing projects in Workspace.

    The key seemed to be creating the top level empty work space with a different name.

    I hope this helps someone.

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