Android SDK 2.3 and the latest eclipse Development Environment (5)

Source: Internet
Author: User

 

VII,
First
Android
Application (
Hello
,
Android world!
)

    1. Create a project: Open eclipse and choose File> New> Project> Android project. The specific input is as follows:

    1. Click "Next" and the prompt is as follows:

    1. Here is only for demonstration. No test project is created. Click "finish.

    1. Edit the helloandroidworld. Java file with the following content:

Package
Org. deaboway. test;

Import
Android. App. activity;

Import
Android. OS. Bundle;

Import
Android. widget. textview;

Public
Class
HelloandroidworldExtends
Activity {

/** Called when the activity is first created .*/

@ Override

Public
Void
Oncreate (bundle savedinstancestate ){

Super
. Oncreate (savedinstancestate );

Textview =New
Textview (This
);

Textview. settext ("Hello Android world! ");

Setcontentview (textview );

}

}

    1. Run the android project: Click the run button on the toolbar, select Run> run from the menu, or right-click the project folder. The "Run as" dialog box is displayed, and select "Android Application ", click "OK.

    1. The running effect is as follows. The AVD loading speed is slow and you need to wait patiently.

    1. At the same time, the eclipse console also prints some information about the runtime, as shown below.

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.