Skip to content Skip to sidebar Skip to footer

How Do You Import An Android Project With No .classpath Or .project Files Into Eclipse?

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 kn

Solution 1:

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.

  1. 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.)

  2. Open ".project" file on the notepad(or any text editor).

  3. You can find "name" xml tag on the line 3 of the ".project" file. Change this to your real project name.

Solution 2:

Try creating new android project and importing after.

Solution 3:

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!

Solution 4:

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).

Post a Comment for "How Do You Import An Android Project With No .classpath Or .project Files Into Eclipse?"