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 application. We will start with very basic one and with time we move to the more advanced applications.

Follow the below steps to make your first application

  • Open the Eclipse ADT
  • File -> New -> Android Application Project
New Android application

New Android application

  • New Android Application form will appear.
  • Fill the form as the picture below and click on Next
New Android application form

New Android application form

Note: Minimum Required SDK – The minimum version of android OS in which the application will run. Target SDK : The latest version of android OS in which the application will run.

  • New Android Application – Configure Project window will appear. You can click next as of now, we will talk in detail in further sessions.
New Android application form 2

New Android application form 2

  • Configure Launcher Icon window will appear, here you will get the opportunity to change your application icon, you can do it later as will, so for now click Next.
New Android application form -3

New Android application form -3

  • Create Activity Screen will appear, Blank Activity is selected by default, click Next
Create Activity

Create Activity

  • Blank Activity will appear, give a name you want to your Activity and to its layout. by default it will be “MainActivity” and “activity_main“. Click Finish
Blank Activity

Blank Activity

  • Your project is created. You can locate your MainActivity java under Hello -> src->com.example.hello->MainActivity.java and the layout file will be Hello -> res -> layout->activity_main.xml.
Hello Project

Hello Project

 

Run the Application:

  • Run the Emulator, Read the article “Emulator” to know how to create a new Emulator.
Emulator Launch

Emulator 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 completed your first android application, 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 carefully 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 appearing on the screen.

Modify a String resource with Name: “hello_world ” and change its Value to I am Sumit Jain, saying Hello to the android world . To know more about , how to modify a string resource, Click here “Strings.xml”

Lets run the application again.

Hello World - updated text

Hello World – updated text

 

Happy Androiding 🙂
Sumit Jain

If you find anything incorrect or you feel that there is any better approach to solve the above problem, please write comment.

You may also like...

Leave a Reply

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