Accepted answer

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.


in my android project folder .project file was missing. restoring the .project file,which will be hidden in unix os environment resolved the error.


updating @jameswald's answer, and incorporating other comments. assuming you want to create a cfesh copy from, say, a backup in your new workspace:

  1. put the existing project in a directory not inside the destination workspace.
  2. in eclipse: file->import->android->existing android code into workspace, next
  3. select root directory: /path/to/project/from/step/1
  4. projects->select all (or not, as the case may be)
  5. make sure you set the new project name correctly - to change one click on the old project name (left column) and then click on the new project name (right column) and then edit. it will default to the class name of the default activity.
  6. assuming you want a copy in the destination workspace, check "copy projects into workspace"
  7. uncheck "add project to working sets"
  8. finish


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.


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.


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


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.


you can also use make new > general > project, then import the project to that project directory


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.


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.


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


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


  1. file → import → general → existing projects into workspace → next
  2. select root directory: /path/to/project
  3. projects → select all
  4. uncheck copy projects into workspace and add project to working sets
  5. finish

Related Query

More Query from same tag