VII,
First
Android
Application (
Hello
,
Android world!
)
- Create a project: Open eclipse and choose File> New> Project> Android project. The specific input is as follows:
- Click "Next" and the prompt is as follows:
- Here is only for demonstration. No test project is created. Click "finish.
- 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 );
}
}
- 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.
- The running effect is as follows. The AVD loading speed is slow and you need to wait patiently.
- At the same time, the eclipse console also prints some information about the runtime, as shown below.