Android Project directory structure analysis

Source: Internet
Author: User

Project structure as shown, project project structure using different SDK versions is different, the overall same, the higher version adds some package structure


1. src

As with Java Projects SRC holds project source code


2. Gen

Automatically generated, where the R.java file is also automatically generated, the ADT plugin automatically modifies the R.java file based on the changes in the res file, and the resource in res corresponds to a 16-based address that is used to refer to these resource files in code.

3. Bin

Project compiled output directory with APK file

4, Res

Storing resource files
A. drawable storage image

(1) drawable-hdpi contains high-resolution images, such as WVGA (480x800), FWVGA (480x854)
(2) drawable-mdpi contains medium-resolution images, such as HVGA (320x480)
(3) drawable-ldpi contains low-resolution images, such as QVGA (240x320)
ldpi:240x320
mdpi:320x480
hdpi:480x800, 480x854
XHDPI: At least 960*720
xxhdpi:1280x720

B. Layout

Store each activity's layout file as an XML file, including how the controls are placed, the color size, and so on.

C. Values

The string used to store the project
D. androidmanifest.xml file

The function List of the Anroid project, a bit similar to the Java EE Project in Web. XML, requires registering Servlet,listener, and each activity needs to be registered in this file.

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.