Show Buttons
Share On Facebook
Share On Twitter
Share On Google Plus
Share On Linkdin
Share On Reddit
Contact us
Hide Buttons

First Android Application

Now time for our first android appli­ca­tion. We will start with very basic one and with time we move to the more advanced applications.

Fol­low the below steps to make your first application

  • Open the Eclipse ADT
  • File -> New -> Android Appli­ca­tion Project
New Android application

New Android application

  • New Android Appli­ca­tion form will appear.
  • Fill the form as the pic­ture below and click on Next
New Android application form

New Android appli­ca­tion form

Note: Min­i­mum Required SDKThe min­i­mum ver­sion of android OS in which the appli­ca­tion will run. Tar­get SDK : The lat­est ver­sion of android OS in which the appli­ca­tion will run.

  • New Android Appli­ca­tion — Con­fig­ure Project win­dow will appear. You can click next as of now, we will talk in detail in fur­ther sessions.
New Android application form 2

New Android appli­ca­tion form 2

  • Con­fig­ure Launcher Icon win­dow will appear, here you will get the oppor­tu­nity to change your appli­ca­tion icon, you can do it later as will, so for now click Next.
New Android application form -3

New Android appli­ca­tion form –3

  • Cre­ate Activ­ity Screen will appear, Blank Activ­ity is selected by default, click Next
Create Activity

Cre­ate Activity

  • Blank Activ­ity will appear, give a name you want to your Activ­ity and to its lay­out. by default it will be “Main­Ac­tiv­ity” and “activity_main”. Click Fin­ish
Blank Activity

Blank Activ­ity

  • Your project is cre­ated. You can locate your Main­Ac­tiv­ity java under Hello -> src->com.example.hello->MainActivity.java and the lay­out file will be Hello -> res -> layout->activity_main.xml.
Hello Project

Hello Project

 

Run the Application:

  • Run the Emu­la­tor, Read the arti­cle “Emu­la­tor” to know how to cre­ate a new Emulator.
Emulator Launch

Emu­la­tor Launch

  • Right Click on your project and go to Run As -> An Android Application
Run the android app

Run the android app

  • That’s it you have just com­pleted your first android appli­ca­tion, Don’t you believe, check out the Emulator.
Hello World

Hello World

Say hello with you name in it, (Change the text).

Open the activity_main.xml and look care­fully into it.

activity_main

activity_main

Look into

 

<TextView

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="@string/hello_world" />

now what is this, This is your text, hello word which is appear­ing on the screen.

Mod­ify a String resource with Name: “hello_world ” and change its Value to I am Sumit Jain, say­ing Hello to the android world . To know more about , how to mod­ify a string resource, Click here “Strings.xml”

Lets run the appli­ca­tion again.

Hello World - updated text

Hello World — updated text

 

Happy Android­ing 🙂
Sumit Jain

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *