How to Program Androids for Beginners

By Jim Campbell

Google provides the Android SDK, so you can create Android apps for any tablet or cell phone that has the Android operating system installed. To get started, you must first install the Eclipse compiler, which lets you create the Java source code files for the Android app. After you install the necessary program, you create a "Hello World" app to practice with the new language.

Step 1

Open a Web browser and download the Android SDK for your computer. The installer sets up the Android development environment, and creates an emulator you use to test your programs.

Step 2

Open a second browser tab and download the Eclipse software from the company's official website. Eclipse does not have an installer. Instead, extract the zip file contents to a directory such as "C:\Eclipse" to store the files. You use "eclipse.exe" to run the software.

Step 3

Double-click the "eclipse.exe" file downloaded in step two to start the programming environment. Click the "File" menu item in Eclipse and click "New," then "Project." The "New Project" wizard opens in which you configure your Android SDK project.

Step 4

Click "Android Project" in the list of project types, then click "Next." In the next screen, choose the Android version you want to target and type a name for your new project. Click "Finish," and Eclipse sets up your new Android project setup.

Step 5

Double-click the "src" folder to open a list of Java source code files. In the beginning of your project, only one Java source code file is listed. Double-click the file to open the source code.

Step 6

Add some code to the main Java source code file. For instance, the following code displays a message to your users:TextView helloView = new TextView(this); helloView.setText("Hello Android World"); setContentView(helloView);

Step 7

Click the Eclipse "Save" button to save the code changes. Click the "Run" button to view the new project in the Eclipse emulator. The emulator looks like an Android cell phone or tablet. Click your project name to see the message displayed in the emulator.