If you’ve imported a project into Eclipse, say from Git for example, then it might not be set as an Android project. There doesn’t seem to be an easy way to convert the project to an Android project through Eclipse itself, but you can change the nature of the project by editing the project XML file.

  1. Close the project in Eclipse
  2. Open .project in a text editor
  3. Assuming <natures></natures> is empty, add the following natures
    • <nature>org.eclipse.jdt.core.javanature</nature>
    • <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
  4. Re-open the project

The first nature lets it know it’s a Java project, the second nature let’s it know it’s an Android project, which of course needs to be a Java project.

You should now have all the Android and Java project options available to you.

  • By: Andrew Kirkpatrick
  • In: Android
  • Under: