How to Create an Android App in Eclipseby Jim Campbell
You must create a new Android app in Eclipse to get started with Android development. The Eclipse compiler uses Java to develop, debug and package an Android app. You can add any Android layout and control to your applications, but you must start with a simple app to learn the Eclipse environment and the Java libraries. The Hello World app is the beginners' reference for Android development.
Click the Windows "Start" button and type "eclipse.exe." Double-click the Eclipse executable that displays in Windows Explorer to start the application.
Click the "File," then "New," then "Project" menu item. A window opens with several project types. Click "Android Project" and click "Next." The next window displays a list of configurations you must set up before creating the project template.
Type a name for your project and choose the Android version you want to target in the list of version numbers. Type a name in the "Package Name" text box and click "Finish." Eclipse creates the template and opens the default code file.
Type the following code in the Java source code file to display the "Hello World" text:
TextView view = new TextView(this);
view.setText("Hello, World"); setContentView(view);
Click the "Run" button to view the new application in the Android emulator. The emulator looks just like an Android phone or tablet. The application runs, and you can see your code results in the working debug emulator window.
- link Android: Hello World
Click here to provide feedback on this article