Reputation: 2781
I'm trying to import and existing Android project into my current Eclipse workspace. I select File->New->Android Project, which brings up the Android project dialog, I then select, "Create project from existing source", Location, Build Target and Finish.
I get the following error: Invalid project description.
Does anybody know how to get past this error?
Upvotes: 169
Views: 247118
Reputation: 4361
What works for me is that: File > Import > Existing Project into Workspace (under General tab), then choose the project root folder. The importing of Existing Android Code into Workspace somehow does not work on Eclipse for me.
Upvotes: 1
Reputation: 133
Same problem happened to me as well and the .project file was not there in the project. I copied a .project file from an existing android project and replace the project name with the name of the project I am trying to import. Then using File -> Import -> Existing projects into workspace I was able to import the project.
Upvotes: 1
Reputation: 13734
/path/to/project
Copy projects into workspace
and Add project to working sets
Upvotes: 208
Reputation: 2781
Solved: If you want to "Create project from existing source", you need to create a new directory and then put the project directory tree into that new directory. Then point to the new directory when importing.
Upvotes: 53
Reputation: 6084
Updating @JamesWald's answer, and incorporating other comments. Assuming you want to create a cfesh copy from, say, a backup in your new workspace:
Upvotes: 1
Reputation: 2973
In my Android Project folder .project
file was missing. Restoring the .project file
,which will be hidden in Unix OS environment
resolved the error.
Upvotes: 1
Reputation: 1746
Just delete the ".project" file in your project folder (it's hidden on Linux, use "ls -a" to show), then from Eclipse, choose Create Android Project from existing source
Upvotes: 13
Reputation: 190
I found James Wald's answer the closest to my solution, except instead of "File->Import->General->Existing Projects into Workspace" (which did not work for me at all) I used "File->Import->Android->Existing Android Code Into Workspace". I am using Helios, maybe your version of Eclipse does not have this quirk.
Upvotes: 4
Reputation: 41
You can also use Make new > General > Project, then import the project to that project directory
Upvotes: 4
Reputation: 655
This post helped me: http://code.google.com/p/android/issues/detail?id=8431
Upvotes: 2
Reputation: 890
It seems you cannot have your project root, with the AndroidManifest.xml deeper than one directory level below your workspace root. I struggled for an hour with this before I just gave up and rearranged my repo.
Upvotes: 4
Reputation: 31
I had the problem of getting errors when checking out an Android project from SVN. This is what I did and the whole thing settled down.
1. checkout the project from SVN as we normally do any other project
2. right click and get properties of the project
3. In the java build path->order and export tab select the android API and OK it
this removed all the project issues
so far so good but not sure if this is the 100% correct method
Upvotes: 3
Reputation: 476
This error message appears when the source code you try to import is inside an existing workspace.
Put your source code in a directory OUTSIDE any existing workspace and then import
Upvotes: 46
Reputation: 14399
Im not sure this will solve your problem since I dont know where it originats from, but when I import a project i go File -> Import -> Existing projects into workspace. Maybe it will circumvent your problem.
Upvotes: 4