How to Create an Android App in Eclipse

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.

Instructions

    • 1

      Click the Windows "Start" button and type "eclipse.exe." Double-click the Eclipse executable that displays in Windows Explorer to start the application.

    • 2

      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.

    • 3

      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.

    • 4

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

    • 5

      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.

Related Searches

References

You May Also Like

Related Ads

View Blog Post

Enter the Geek Vs Geek Giveaway and Win a Roku!