In the actual development process, if the Android project file structure is not clear or unfamiliar, it will directly affect our software development. Today we will introduce the structure of the Android project file, and hope to help you understand the structure of the Android project file.
When we create an Android project, the file structure shown in the left-hand Solution Explorer appears as follows:
First of all, the SRC directory is discussed. SRC is the source code directory. Dedicated to storing Java source code files;
Gen: Resource Index directory. Android programs are automatically created and automatically modified. We do not need to modify;
The SDK version of the Android 4.0.3:android program. Indicates that the version we are using for this project is now 4.0.3;
Assets: Resource Directory. You can store resources such as videos. It is important to note that a single resource in the resource directory cannot exceed 1M;
Bin: I'm not going to introduce you to this?
Res: This is the same resource directory as assets. The folders in this resource directory are pre-determined. Only drawable, animation, layout, menu, values, XML, raw folders can be stored. The folder name is not modifiable. Which drawable we found that there are 4, opened and found that the picture is the same, in fact, it divides the image into high and low pixel format for storage; The animation folder is used to store a description file of the animated XML format used in the project; layout is an XML file that holds the layout of the project The menu stores the XML file description that is used by the menus in the project; values store some XML descriptions of constants; The XML folder is used to store all other XML files, and the raw folder is used to store other files used in the project.
AndroidManifest.xml:AndroidManifest.xml is a required file for each Android program. It is located in the root directory of application , which describes the global data in the package, including the components exposed in the packages ( activities, services, and so on), their respective implementation classes, various data and boot locations that can be processed.
the difference between assets and res:
1, Res is a must appear, and assets is optional;
2. The content in res is automatically compiled into the R.java in the Gen folder. and assets not;
3, the generated installation files (APK), res is stored in binary format (except the Raw folder). And assets is the original document;
4. The folders in res are fixed and non-modifiable. And assets can be created arbitrarily.