Pages

Build your first android app

1) For creating new project

  • select File>New>Project.
  • eclipse android wizard  :: futureX techblog
  • select the android project & click next.  
  • fill the details in dialog box & click finish. See the instructions here.
Now an android project have been created. you can simply explore it & see simple program.

eclipse android main :: futureX techblog
 
2) Write the message

For writing the message, we are using TextView class. Change the on create method as

public void onCreate (Bundle savedInstanceState){
super.onCreate (savedInstanceState);
TextView tv = new TextView(this);
tv.setText =("Hello android");
setContentView(tv); // Pass the TextView object
}

3) Run the application

right click on your project > Run as > Android application

android emulator may takes 2-3 min. to run the application.

 


No comments:

Post a Comment