22

I know this question is posted already here, but that doesn't solve my problem.

I pull a project from github branch, and when i try to import it : File->Import->General->Existing projects into workspace then Select root directory and here when i click on Finish button i get Invalid project description.

I am pulling the project into a folder called Android, this folder contains the main folder of the project MyAndroidProject which i imported in Eclipse.

I don't know what is wrong here.

Community
  • 1
  • 1
Malloc
  • 15,434
  • 34
  • 105
  • 192
  • Can you post the stack trace or any other information? Kind of hard to tell from the information you've provided. – James McCracken Oct 01 '12 at 16:47
  • What are the contents of its .project file? – nitind Oct 01 '12 at 20:55
  • 1
    Good afternoon, look out the link [Invalid project description][1] [1]: http://stackoverflow.com/questions/5784652/eclipse-invalid-project-description-when-creating-new-project-from-existing-so/13458004#13458004 – Rodolfo Faquin Nov 19 '12 at 16:31
  • 3
    You may get this error if your code is already checked out in the workspace folder. You need to check it out to a different location. This may or may not be the problem here. – superluminary Oct 08 '13 at 15:37

4 Answers4

69

I know I'm late to the party, but just in case someone else is stuck at this point, just like me a couple of minutes ago: You could try File>Import>Existing Android Code into Workspace. I had the Git repository I wanted to import directly in my workspace. Still, I needed to check the Copy projects into workspace option in order to make it work.

Edit

I just checked out the link from one of the comments above, recommending File>Import>General>Existing Project into Workspace. I should mention that the eclipse project metadata was not under version control in my case, rendering an import as existing project impossible! This solution applies to existing android code without .project files etc.

Edit 2

Just another remark: I realized recently that this issue only seems to occur if the project root also is the repository root, much like this:

workspace  
└─ project root  
   └┬ .git
    ├ src
    └ ...

When I moved the project just one directory level lower, the issue disappeared.

Michael Jess
  • 1,907
  • 1
  • 19
  • 17
10

Just move the project folder one directory lower ( make another folder in the directory & copy your project into that folder. Now import the project with this newly created version. )

Alexander Farber
  • 21,519
  • 75
  • 241
  • 416
Rohan K
  • 872
  • 11
  • 18
3

Had same issue, changed the workspace to one directory above the project and then imported project. Worked for me

rohitkadam19
  • 1,734
  • 5
  • 21
  • 39
1

I've just read this very old question. The problem is in the Eclipse specific folders.

Simply remove .settings and .project and reimport.

Calabacin
  • 725
  • 2
  • 8
  • 19