score:338

Accepted answer

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.

score:0

what operating system are you using? i use linux mint. in my case it turned out to be a symbolic link issue. every time i tried to create the project with the symlink path, it would give me that error. creating the project elsewhere, and then migrating it to the symlinked directory solved it for me.

score:0

the easiest way to solve this problem is just to move your`s project to another folder and import it. this is because you have already had this project(or project with the same name) in that folder. and when you delete project, eclipse still retains a reference to it

score:0

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.

score:0

i've been having this problem in linux, with a project that i renamed, removed, and reimported. somewhere in the .metadata, it's still there evidently.

i finally solved it by the following steps:

close eclipse
mv .metadata .metadata_orig
start eclipse
reset default workspace
reimport projects

this may not work for everyone, especially if you already have lots of projects in multiple workspaces. but if you're used to reconfiguring eclipse (which i do every time i upgrade to the next eclipse release) it's not too bad.

score:0

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

score:0

copy the project into your workspace, create new android application project with the same name from eclipse file->new->project and voila.

score:0

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.

score:0

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.

score:0

if you wish to open a new project from an existing source code in the following way:

file -> import -> general -> existing project into workspace

you still have the message "invalid project description". i solve it just by going in

file -> switch workspace

and choosing one of the recent workspaces.

score:0

i got rid of my issue by changing file > workspace and then, after the restart, reset the workspace again.

score:0

in my case, i had error "invalid project description" when i open eclipse and put my computer into sleep mode then wake up to work. the only thing i need to do is close my eclipse and open it again. i see when open eclipse and put computer to sleep or hibernate will made many other strange error!

score:1

here is what i did that worked great. i just imported an existing project under general instead of importing an android project.

score:2

  1. copy the code you want somewhere outside your workspace folder
  2. create a new project using existing code from that folder
  3. once the project is created, right click on it and refactor > move it into the workspace folder. (use default location)

score:2

i solved this problem with using the following steps:

  1. file -> import

  2. click general then select existing projects into workspace

  3. click next

  4. browse the directory of the project

  5. click finish!

it worked for me

score:4

i have been banging my head against the wall with a similar problem. the only thing that helped is following the steps in this post.

score:4

this problem drives me crazy as well but i know what the cause of it is. the problem is that eclipse is not smart enough to create a folder with the same name of your project within your workspace folder if it is custom.

the way to solve this is to make sure all of your projects are in a folder with the name that matches your project name, otherwise it will dump all of your project files straight into the directory. the reason why you end up seeing that error is because it thinks you are putting a project inside another project (probably reads the project config file).

i noticed this is especially a problem when not using the default workspace path. the way i solve this problem is to just add the project name to the end of location. so let's say you are putting a project named "helloworld" into /users/name/documents/projects/android/, you would want to manually add "helloworld" to the end of it, like this: /users/name/documents/projects/android/helloworld. this would ensure that the project is put in it's own folder called "helloworld" and not inside some other project. be sure that if there are any projects not within folders into a folder of the same name as the project to solve the errors.

score:4

i solved this problem with using the following steps:

1) file -> import
2) click general then select existing projects into workspace
3) click next
4) browse the directory of the project

click finish!

it worked for me

score:7

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.

score:39

instead of import from android -> existing android code into workspace, you must use general->existing projects into workspace. it's probably a solution.

score:132

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


Related Query

More Query from same tag