Creating an Android application in Eclipse

The ADT plugin provides a New Project Wizard that you can use to quickly create an Eclipse project for new or existing code. To create the project, follow these steps:

1. Select File > New > Project
2. Select Android > Android Project, and press Next
3. Select the contents for the project:

- Select Create new project in workspace to start a project for new code.

Enter the project name, the base package name, the name of a single Activity class to create as a stub .java file, and a name to use for your application.

- Select Create project from existing source to start a project from existing code. Use this option if you want to build and run any of the sample applications included with the SDK. The sample applications are located in the samples/ directory in the SDK.

Browse to the directory containing the existing source code and click OK. If the directory contains a valid Android manifest file, the ADT plugin fills in the package, activity, and application names for you.

4. Press Finish.

The ADT plugin creates the these folders and files for you as appropriate for the type of project:

- src/ A folder that includes your stub .java Activity file.
- res/ A folder for your resources.
- AndroidManifest.xml The manifest for your project.


No comments: