Saturday, 21 February 2015

How to create your first android project (Android programing)?

Step (1) : In Eclipse click 'File' -> 'New'. You will see the 'New Project' Wizard as shown below. Select 'Android Application Project' and Click 'Next'.



Step (2) :Enter the a name for the application in the 'Application Name' field. I have entered 'MyFirstProj'. But you are free to choose any name. Then press 'Next'.





Step (3) : In the next window select 'Blank Activity' and click finish. This will create a blank project with a text view that says Hello world!.




 Step (4) :In the project source folder you should see the following content in the 'MainActivity.java' file.


  Step (5) :In the project layout folder you should see the following content in the 'activity_main.xml' file.



 Step (6) :Now to open the Emulator click 'Window' -> 'Android Virtual Device Manager' . This will open the 'Android Virtual Device (AVD) Manager' and select a device and click 'start'. If you do not have any virtual devices created already click 'create' and fill the wizard to create an emulator. This may take about a minute load the emulator for the first time. Wait until the emulator is fully loaded and displays the home screen.

If 'Android Virtual Device Manager' is not listed under 'Window'. Click 
 'Window' -> 'Customize perspective' -> 'Command Groups Availability' tab. tick the "Android SDK and AVD Manager" option and click the 'OK' button. Now 'Android Virtual Device Manager' should appear when you click 'Window'.

Step (7): To clean the project click 'Project' -> 'clean...'. This will clean the project. Now the project is ready to run. So now, right click on the project name from the 'Project Explorer' window and move the mouse over to 'Run as' and click 'Android Application'. This will run the project and should display Hello World! as shown below. If it does not display Hello World! click the 'Menu' button on the emulator and should display Hello World!. Congratulations!!!!!!. You have successfully created your first android project.


























No comments:

Post a Comment