Android cainiao Study Notes 4 ---- android project structure, cainiao notes
Src:
Application source code storage directory
Gen:
Automatically Generated Directory, which stores all files automatically generated by Android development tools.
The most important part in the directory is the R. java file. This file is automatically generated by the Android development tool. The Android development tool automatically updates and modifies the R. java file based on the resources in the res directory. Because the R. java file is automatically generated by the development tool, we should avoid manual modification to R. java. R. java plays a dictionary role in the application. It contains the IDs of various resources. Through R. java, the application can easily find the corresponding resources.
In addition, the compiler checks the R. whether the resources in the java list are used, and those that are not used are not compiled into the software. This can reduce the space occupied by applications on mobile phones.
Res:
Resource Directory, in which we can store various resources used by applications, such as xml interface files, images or data.
1) res/drawable: stores png, jpg, and other Icon files.
2) res/layout: stores xml interface files. xml interface files are the same as HTML files and are mainly used to display user operation interfaces.
3) res/values: stores various types of data used by applications. Different types of data are stored in different files as follows:
(1) strings. xml: defines strings and values.
(2) dimens. xml: defines dimensional data.
(3) styles. xml: defines a style.
Libs:
Supports the library directory. some third-party jar packages required for program development can be placed in this directory. The system automatically adds the jar package to the environment variable.
Assets:
In addition to providing the/res directory for storing resource files, Android can also store resource files in the/assets directory, and the resource files in the/assets Directory are not stored in R. java automatically generates an ID. Therefore, the file path must be specified to read files in the/assets directory, for example, file: // android_asset/xxx.3gp.
AndroidManifest. xmlProject list file
This file is read when the software is installed. It lists the functions provided by the application. You need to configure the various components you have developed in this file, if the application uses built-in applications (such as telephone services, Internet services, SMS services, and GPS services), you must declare the permission in this file.
Project. properties:
Project Environment Information, which generally does not need to be modified. Earlier versions: default. properties
Target = android-14: Specifies the platform version for application development and testing.