In my first post I have posted how to install android platform.
Now lets move towards the first andoid application.
We will start with a simple android application which will show a screen printed "Hello World, AndroidActivity!".
Now open file in file open new android project.
once you click in new android project the screen will open like it rest i will tell in the screens.
when you click on next a window will open in which you have to write the desired application name then the package name basically package name is devided into three parts and seperated with the dots(.) where the your is written in the window place com there then any desired text like your name ,company name then after . and then the application name.
suppose i am making a new project with name hello and my name is nik and application name is AndroiD. then i will ceate package like "com.nik.AndroiD".
then the activity which is a default auto generated class name whatever you want and the minimum sdk version will be placed there automatically according to what target you have selected for the project.
and click on Finish button.
On clicking finish you will see a window in which you have a project named hello just explore that project and you will see various folders and files.i am showing you below.
When you see these files then time to check that if the applcation is running or not.
First make a simulator means virtual platform to run the applications for that click on window then AVD manager.
In AVD manager you will see the window where you have to create a Enumelator
give a name to avd and select target according to project target.then click on create avd.
Once you have created the AVD you have to run the application
for that just right click on the hello project then go to "Run As" and click on the Run Configurations....
now you will see the window like below.
1.click on Android Application
2.click on Target
3.click on checkbox which enumelator you want to launch
4.click on run.
after clicking on run a enumeltor will open like below.
dont make any change in the application till the enumelator starts.Once it starts it will look like an android mobile on your system.
Simply unlock it and here is the output of the Application.
later i will tell about each file and folder of the project in brief.













No comments:
Post a Comment