After the android development environment is set up, create a new android project, you can see the following directory structure:
- Src: store source code
- Gen:edu.xidian is the name of the package that was entered when the android project was created. R.java is a class that is automatically generated by the development tool. It is automatically modified according to the contents of the res file and does not require us to edit it.
- Assets: Places where the resource files needed by the application are stored (eg images, animations, etc.)
- Res: is also the place to store application resource files. Unlike assets, all resource files stored in this folder are automatically generated with IDs in the R.java file. When we use them in programs, we don't need to write paths. Just call the variable in R.java.This should be a standardized development method provided by ADT.
- Res/drawable-mdpi These three folders are for storing pictures, the difference lies in the resolution, in order to adapt to the different screen resolutions of different mobile phones.
- Res/layout storage layout of the Activity file
- Res/values stored in the text displayed in the Activity, can be called in R.java, to facilitate the development of multi-language version of the application
- AndroidManifest.xml The following is the contents of the file without any modification:
<?xml version="1.0" encoding="utf-8"?>
<application android:icon="@drawable/icon" android:label="@string/app_name">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<uses-sdk android:minSdkVersion="8" />
It is the setting file for the entire application. The details will be described later.
- <intent-filter> tag Sets the first activity displayed when the application starts
- Default.properties property file
This article has been printed on copyright and is protected by copyright laws. It must not be reproduced without permission.If you need to reprint, please contact the author or visit the copyright to obtain the authorization. If you feel that this article is useful to you, you can click the "Sponsoring Author" below to call the author!
Reprinted Note Source: Baiyuan's Blog>>https://wangbaiyuan.cn/en/android-project-file-structure-2.html