score:53

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.

score:1

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

score:1

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

score:1

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.

score:1

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.

score:3

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

score:4

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.

score:4

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

score:4

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.

score:4

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.

score:13

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

score:46

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

score:208

  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