Android learning path (2) application scenarios and file introduction of original files in the project, android Native Development

Source: Internet
Author: User

Android learning path (2) application scenarios and file introduction of original files in the project, android Native Development
1. src file: directory for storing java source code

2. gen file: automatically generate all files automatically generated by the android development tool. The most important file in the directory is the R. java file, which is automatically generated by the android development tool. The android development tool automatically updates the revised version based on the resources in the res directory. java file, because R. java files are automatically generated by development tools, so we should avoid manual modification to R. java. The R. java file is used as a dictionary in the application. It contains the IDs of various resources. Through R. java, the application can easily find the corresponding resources,
2.1R.java: ID used to register various resources. You can use the ID to reference these resources.
3. res file: Resource Directory. It is used to store various resources used by applications, such as images, files, and texts used by software.
3.1 drawable: used to store image resources with different screen resolutions.
3.2layout file: used to store resource files on the Software Interface

3.3value file: used to store data used by applications, such as size and string
4. assets file: Resource Directory. In addition to the/res directory, android can also store resource files, images, or data in the/assets Directory. However, the resource file obtained in the/assets Directory will not be R. java automatically generates an ID. Therefore, the file read in the/assets Directory must specify the path of the file, for example, file: // android_asset/XXX.3gp.
5. androidManifest. xml project list file
This file lists the functions provided by the application. You need to configure various components (activity, contentprovider, BroadcastReceiver, and Service) that you have developed in the future, if the application uses the built-in applications (such as the telephone service, Internet service, SMS service, and GPS Service), you must declare the permission in the file.
6. default. properities project environment information, which does not need to be modified.
Android I used clean in eclipse and found that the R file in gen of each project is missing, how can I find it back? I have seen similar phenomena. There are several times of cleaning, several times of implementation. I copied all the files under the project and re-built the project and pasted the new project.
In android, XML is used to store data. 1. The program has built-in xml to consider using the following code example: file: \ android_asset \ 1.xml when reading files in/assets.
2. The program also downloads xml to consider placing it on the SD card.
3. the directory structure of the Android project supports debugging, and the assets file is packaged into the APK.

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.