Eclipse is looking for eclipse projects, meaning its is searching for eclipse-specific files in the root directory, namely .project and .classpath. You either gave Eclipse the wrong directory (if you are importing a eclipse project) or you actually want to create a new project from existing source(new->java project->create project from existing source).
I think you probably want the second one, because Eclipse projects usually have separate source & build directories. If your sources and .class files are in the same directory, you probably didn't have a eclipse project.
One solution to this is to use Maven. From the project root folder do mvn eclipse:clean followed by mvn eclipse:eclipse. This will generate the .project and .classpath files required by eclipse.
In new updated eclipse the option "create project from existing source" is found here,
File>New>Project>Android>Android Project from Existing Code. Then browse to root directory.
I had the same issue when I've modified .project xml-file. When I reverted files to original version the project was created, then I was able to import project. Maybe it helps someone who has the same kind of problem ;)
In order to resolve this problem for android projects. follow the below mentioned steps
new->android project->create project from existing source and in this you can give your code location. Now, it will import all the specified project code and will work fine
If you don't have I just have .project and .classpath files in the directory, the only way that works (for me at least) with the latest version of Eclipse is:
Create a new Android project
File -> New -> Project... -> Android -> Android Application Project -> Next >
Fill in the values on this page and the following according to your application's needs
Get your existing code into the project you just created
Right click the src file in the Package Explorer
General -> File System -> Next >
Browse to your project, select the necessary files, hit Finish
After this, you should have a project with all your existing code as well as new .project and .classpath files.
After a long time finally i found that!
Here my Way:
File -> New Project -> Android Project From Existing Code ->
Browse to your project root directory
finish!
you have to change the name field to your project name. you can do this in line 3 by changing HereIsTheProjectName to your own project name. then save it.