I cloned an android project from google code using Mercurial but there was no .classpath or .project files so eclipse doesn't even recognize the code as a project.
Does anyone know if there is there a simple way to import this project into eclipse?
(I was thinking that maybe I could edit these files from other projects and copy them over to this project but I don't know enough about the purpose of these files).
This is very simple.
You have to know that ".classpath" file is totally the same thing
with other android projects.
and, also ".project" file is the same except project name in it.
Copy ".classpath" and ".project" files from other android project
and, paste to to your project directory.
if you don't have any android project, just create new one.
(it's not important package name.)
Open ".project" file on the notepad(or any text editor).
You can find "name" xml tag on the line 3 of the ".project" file.
Change this to your real project name.
Try creating new android project and importing after.
Create a new android project and copy the java codes and xml layouts.You are going to need manifest file and I'm pretty sure that Google examples also have the manifest.xml file.Copy it to your project.But if you can't find the manifest use an another manifest and modify it to your project(change class path, activity, class name ect.)and if you need any permissons, they are needed to be included too.It should work,Good Luck!
You can also do the inverse of the other suggestions: Take a .classpath and .project file from an Eclipse-created standard Android project (the default files directly after creation are fine), copy both files into your example directory, and import as an existing Eclipse project.
You may need to adjust the project name in the .project file (XML, just open with a text editor, 3rd line).