Study Notes for Android section 2 helloworld Program

Source: Internet
Author: User

1. helloworldProgram

Create an AVD, that is, the simulator. In the toolbar, click the SDK and AVD manager buttons, and then new. The configuration is shown in the left figure. After the configuration is complete, as shown in the right figure, click Start.

 

Create an android project, set it as follows, and click Android Application in run

The result is displayed? If nothing is written, there will be helloworld.

 

2. Associate the class file

We often need to check the source file. The default value is javadoc, but sometimes we still need to check the source file (that is, press Ctrl and click to see the Java file). solution:

First download the SRC file: android-2.2-src.zip: http://u.115.com/file/f1c7946c3c

Next, create a source folder under the SDK root directory in the previous section and put the downloaded ZIP file into it. Other versions can be downloaded later.

Finally, in the project, select an activity, press Ctrl, and click. You cannot see the activity, and attach source file... Select the SRC file in the new window and click OK.

 

3. Introduce the project structure: too many!

R. Java: Do not manually modify

Assets: resource files, music files, videos, and so on. All items are packaged in the package, whether or not they are used.

Res: it is a resource file, image, etc. It will be packaged only when used.

Main. XML in layout is very important. layout management of this application

String. XML in values is also very important, and some fixed strings are configured.

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.