Additional Blogs by SAP
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

This blog is a step-by-step guide in building your first android application.


Install JDK

 Install JDK via the following link :     

Extract the contents of the ZIP file



Install Eclipse

Install Eclipse via the following link :

              >  Download the ZIP file to your local folder

              >  Extract the contents of the ZIP file

              >  Double-click on eclipse.exe to start the eclipse

              >  Enter the folder for the Workspace, and click OK

</p><ul><li>Install the Android SDK</li></ul><p>Install the SDK via the following link :</p><p> [  |]</p><p> </p><ul><li>Install Eclipse ADT(Android Development Tools) Plug-In*

                     >  Start Eclipse

                     > Click on Help -> Install New Software


                    > Click "Add" in the right corner


                    > In the "Add Repository" dialog, enter the path as shown below,    and click OK


                    > Select the "Check Box" against "Developer Tools" and click "Next"

                    > In the next window, you'll see a list of the tools to be downloaded.


Click Next.


Click Finish.

                    > When the installation completes, restart Eclipse.


Configure ADT Plug-In                    > Start Eclipse

                    > Select Window -> Preferences

                    > Select "Android" from the left panel, enter the downloaded SDK location and click "Apply" and then "OK"




Configure the Android Simulator               > Start Eclipse 

               > Click on Window -> Android SDK and AVD Manager

               > Select "Virtual Devices" in the left panel and click on "New"

               > In the dialog , enter as shown below



Test your configuration by writing a simple application               > Start Eclipse

               > Click on New -> Project

               > Select "Android Project" and click on "Next"

               > Enter the attributes of the project and click "Finish"



         > The project "myFirstApplication" will show the nodes as shown below




            > Double-Click on AndroidManifest.xml



         > Click on the tab "Instrumentation", and then "Add"



         > Select "Instrumentation" in the dialog

         > Click on "Browse" against the name



         > Wait for the system to find a matching runner, and then select the matching item, and click OK


         > Select the package, and then click on "Save"



 *        Now lets write a simple application to display a text , on click of a button</p><p>         > Lets add a button and a Textbox in the layout</p><p>         > Click on "Main.XML", and modify the XML as shown below</p><p>!|height=227|alt=image|width=192|src=https:/...!</p><p>*XML Layout **********************************************</p><p><?xml version="1.0" encoding="utf-8"?><br /><LinearLayout xmlns:android="[ |]"<br />    android:orientation="vertical"<br />    android:layout_width="fill_parent"<br />    android:layout_height="fill_parent"<br />    ><br /><TextView  <br />    android:layout_width="fill_parent" <br />    android:layout_height="wrap_content" <br />    android:text="Hi Android"<br />    />    <br /><TextView  <br />    android:id="@id/result" <br />    android:layout_width="fill_parent" <br />    android:layout_height="wrap_content" <br />    android:text=""</p><p>    /><br /><Button <br />  android:text="Display Text" <br />  android:id="@id/button_text" <br />  android:layout_width="wrap_content" <br />  android:layout_height="wrap_content"><br />  </Button>    <br /></LinearLayout></p><p>************************************************************



    **  Note that the name of the text view is "result" and name of the button is "button_text"

Lets go back and write some code to finish our application

         > Click on "myFirstApplicationActivity" and write the following code :



    • Start of  Code **********************************************</p><p>package;<br />import;<br />import android.os.Bundle;<br />import android.view.;

import android.widget.Button;

import android.widget.TextView;

public class MyFirstApplicationActivity extends Activity {

 private TextView result; 

    /** Called when the activity is first created. /<br />    @Override<br />    public void onCreate(Bundle savedInstanceState) {<br />        super.onCreate(savedInstanceState);<br />        setContentView(R.layout.main);<br />        result = (TextView)findViewById(;<br />        Button button_text = (Button)findViewById(;<br />        button_text.setOnClickListener(new Button.OnClickListener() <br />         { <br />         public void onClick (View v)<br />          { <br />          display_text(); <br />             }<br />         }<br />        );        <br />    }<br />    public void display_text()<br /> {<br />       result.setText("[ |]");</p><p> }      <br />}</p><p>**************************************************************




         > Run the application by clicking on "Run" in the menu bar and then select "Android Application" in the dialog


   >  Wait for a few seconds until , we see the following screen :



Wait for about 40-60 secs to see your application, then click on the home in the right hand side, or unlock the application

Here it is !!!  "myFirstApplication".






Click on "myFirstApplication".



Click on the button "Display Text" to see the text (



0 Kudos
Nicely written!

To install app on your Android phone just connect it to your computer. When you run the app again Eclipse will find it automatically and install it on the phone.

0 Kudos
Well written blog, explaining the nitty gritty of getting the first Android Application started.
0 Kudos
A nice blog, indeed, a easy to find, one place where i can see all the steps for developing first Android app. I had to go through more than 3 documents during my development of "Hello World!" app 🙂 ..Thank you Girish.
Former Member
0 Kudos
Well done !!