First Android Hello word

Source: Internet
Author: User

I have never learned java before, and I am the first to use Android. So I learned it from the classic Hello word:

 

Create the first Android development project:

1. Select File> New> project and select Android project, 2. Click Next To Go To The following page: After you click Finish, the following Code : Public class helloandroid extends activity {
/** Called when the activity is first created .*/
@ Override
Public void oncreate (bundle savedinstancestate ){
Super. oncreate (savedinstancestate );
Setcontentview (R. layout. Main );
} You only need to make a slight modification: Public void oncreate (bundle savedinstancestate ){
Super. oncreate (savedinstancestate );

Textview TV = new textview (this); TV. settext ("Hello, Android"); setcontentview (TV );
} Then a new AVD is created. Choose Windows> Android SDK and AVD manager from the menu. The following page is displayed:

You can simply set it to run,

 

After running:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.