International practice HelloWorld && Eclipse Interface Directory structure review

Source: Internet
Author: User
Tags phone definition

Officially started Android learning, I used Guo Shen's "first line of code Android"

Configure the environment before you develop it. Google's Eclipse bundle, which contains the Android SDK, Eclipse, ADT plugin. Http://pan.baidu.com/s/1ntLYp5J download down and follow the step by step to be good, in fact very simple.

The next step is to easily create HelloWorld and virtual machines.

The key place to come, in order to later and robot happy to play, must have a clear understanding of several common directories. The catalogue map is as follows

1. SRC

As in Java src is the source code, which has the package name, a variety of. java files under the package, and later activity activities are created in SRC. In view of my current knowledge, I understand an activity as a class. At the same time understand as an interface, if wrong, then modify later.

2. Gen

The files are generated at compile time.

At this stage it is worth noting that the r.java file. Each resource that is added to the project in the future is defined once in the file, giving him a unique number so that the other needs to be accessed by ID.

3.bin

Contains the files that are generated automatically at compile time. One of the fun is the debugging process of packaged apk files, in this directory can be directly dragged to the phone to use.

4.res

Resource abbreviations, most of the resources used in the program are in this directory, which has multiple sub-directories:

*drawable put is used in the picture, behind the band is the sharpness, high (hdpi), Medium (MDPI) and Low (LDPI). With a higher definition of x. The system is automatically called according to the actual phone definition. In general, each image should be stored in a single folder.

*Layout folder is to store layout files, layouts I understand for the interface. XML End (XHTML)

*Menu file by name

*value holds a constant file. The following is a string.xml inside a custom string. Google recommends defining strings in this file so that they are introduced in a @string/name way.

5.AndroidMainfest

Configuration file. This stage I understand for the account, and C + + declaration similar, you want to use wirelessly four components, must now register, otherwise is Heihu, the system can not find this thing. It has information about the component and can respond to the intent,cotegory description. Attached:android four components-->activity (activity), Service (services), broadcast (broadcast), content provide (contents provided)

You can also add permission declarations to your application, modify the minimum compatible and target versions that were created when you create the program ...

OK, directory structure on these, as long as the understanding on the line, with the study in depth, I know that in the end will be clear.

International practice HelloWorld && Eclipse Interface Directory structure review

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.