Android Studio project file structure translation

Source: Internet
Author: User

Android Studio Project Document Structure Translation

Personal translation, used as a memo.

Link Address: Https://developer.android.com/tools/projects/index.html#ApplicationModules

Android Project Files

Studio's project files and settings, set the scope of the action to include all the module.

Take the following demo as an example.

. git:git version-controlled file storage directory.

. Gradle:gradle performs some compilation of the generated directory

Idea: Some of the configuration files generated by IntelliJ idea (these files are of course related only to the current project).

App: The default generated folder and file for the app module.

Build: Records the output of all compiled module records (including the APK for package generation).

Gradle: Contains the Gradler-wrapper file.

. Gitignore: Records the file names and directories that git does not need to track.

Build.gradle: Some properties of the custom build system. You can edit and modify this file to specify the build configuration of the default application and to set the storage path of the key and Alia for the build system, which can be used when packaged into a release version. This file is part of the project, so it should be placed in the version control tool. (The official website is so written, and the following module in the same interpretation of build.gradle, do not know whether the official website of the problem.) This is actually the version of the specified Gradle plugin, and the warehouse address used. )

Gradle.properties: Gradle configuration at the project level.

The Gradle startup script for the Gradlew:unix system.

The startup script for the gradlew.bat:windows system.

Local.properties: Some of the specified property configurations for native development of the build system configuration. such as the path to the SDK. Because the content of this file is dependent on the developer machine, this file should not be placed in any version control tool.

Some of the files of the. Iml:module are created by IntelliJ idea to store some information about the module.

Settings.gradle: Used to specify which child module can be used to build.

Android Application Modules

Build/: When the module builds each channel, the file directory is stored. Generally stored in the main application.

libs/: Contains some private jar packages that are stored in the main application.

src/: Contains child activity file, activity file exists in Src/main/java//activityname>.java. Also includes. Java and Aidl code files are all in this directory.

androidtest/: Contains a few test files.

Main/java/com.>project<.>app<: Contains some Java files.

main/jni/: Contains some JNI files.

main/gen/: Contains some of the Java files generated by studio, such as r files and files generated by Aidl.

main/assets/: This file is empty and you can use it to save some resource files. Files saved in this folder will be compiled into the APK. You can navigate to this folder just as you would use a URI to locate a typical system file. This file can be read as a stream using Assetmanager. For example, putting text and game data in this folder is a good choice.

main/res/

Contains some resource files, like drawable,layout,string.

anim/

The XML definition file that contains the animation. Specific content can be seen in the type of animation.

color/

Store color values.

drawable/

An XML file that stores image resources such as png,jpeg or Gif,.9png, and describes the shape of a picture or the state of a picture object, depending on the resource file Type section.

mipmap/

The folder that the app launches the icon to hold. The Android system will hold all the resources under this folder, including those related to the screen size, such as mipmap-xxxhdpi, and regardless of the resolution of the phone on which you installed your app, the Android system will decide which graph to choose for the best display on the current phone resolution.

layout/

Layout file information.

menu/

The layout file of the menu,

raw/

The folder where any files are stored. Saved in this folder and saved under assets, there is no difference in nature. The only difference is the way it is read. Reading these files is generated by AAPT and must be referenced by the R folder, for example, put some MPs or Ogg in this folder.

values/

A resource file defined by an XML element. Unlike other resource files under the Res folder, these files are defined by XML elements and cannot be referenced by the name of the resource folder. Instead, the type of the XML element within the file determines his type in the R file.

xml/

Store some XML files that define the clutter of the system components. For example, define the Preferencescreen, Appwidgetproviderinfo, or searchability Metadata.

Androidmanifest.xml:

The file describes the nature of the module and defines all the components under Application. For example, describe Activity,service,intent,receiver, and some content provider, permission declarations, additional jars, features of supported devices, level requirements for APIs, and others. (Does something not fit into the build.gradle?) )。

. Gitignore: Records the file names and directories that git does not need to track.

App.iml/:intellij Idea's module information.

Build.gradle: Some properties of the custom build system. You can edit and modify this file to specify the build configuration of the default application and to set the storage path of the key and Alia for the build system, which can be used when packaged into a release version. This file is part of the project, so it should be placed in the version control tool.

Proguard-rules.pro: Some confusing files that are customized.

Android Studio project file structure translation

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.