Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse "Invalid Project Description" when creating new project from existing source

Go into your workspace, and move your project source code folder to another area outside of your workspace (like the desktop). Make sure the project is deleted in eclipse, then create a new project from source from that directory.

Another thing you could do is try creating a project of a different name (from the first project's source), so that the workspace will contain the new project as a functional project. Then, go into your workspace directory and absolutely delete the folder that contained the original project, or move it. Try loading the project from source again, this time using the second project, by naming it with the correct name. Or, you could try refactoring the second project back to the first's name.


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


Instead of import from Android -> Existing Android Code Into Workspace, You must use General->Existing projects into workspace. It's probably a solution.


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.