Android Studio Project Structure

Source: Internet
Author: User
Tags jcenter

We created an Android Project and opened it as shown in:

When we select Project view, we have the following project document structure:

The figures above are what we'll be explaining next.  
Let's first look at 1: 
We created application, asked us to enter the project name, 1 is the project we created, Androiddevelopcourse is the project name, in the actual development, we want to give our project a clear expression of the name of the product, the general use of English to describe, For example, our course is " Android Development Course ". 1 After the expansion is our complete project document structure.

2: Our Android module, in as, is divided into project (workspace), module (modules) Two concepts, we create a project will default to create a module, where the app is one of our module, an Android application document structure.

3:libs, which stores the project's class library, such as the. jar file used in our project.

The source file directory of the 4:src,android project, which holds all the resource files used in the application.

5:androidtest, store Our application unit test code and we can do unit testing here.

The home directory of the 6:main,android project, containing the Java directory. Java source code files, Res holds resource files, contains images, string resources, and so on, Androidmanifest.xml is the project's configuration file.

The Gradle build script for the 7:build.gradle,android project is explained in detail in the following comments:

Represents the use of the Com.android.application plug-in. Apply plugin:' Com.android.application 'Configure all Android build process parameters required for Android {SDK version compilesdkversion for compiling21stVersion of the tool used to compile the Gradle project Buildtoolsversion"21.1.2"Project default configuration Defaultconfig {Application Package Name ApplicationID"Com.devilwwj.androiddevelopcourse"Minimum supported Android version minsdkversion14 //target version targetsdkversion 21 //version number Versioncode 1 //version name VersionName Span class= "hljs-string" > "1.0"} //compilation type. Default two: Release and debug Buildtypes {release {//set whether to use confusion minifyenabled false //confusing files Proguardfiles getdefaultproguardfile (  ' Proguard-android.txt '),  ' Proguard-rules.pro '}}}//is used to configure the referenced dependency dependencies {compile filetree (dir:  ' *.jar ']) compile  ' com.android.support:appcompat-v7:22.0.0 '}          

The compilation directory for the 8:build,android Studio project.

9:gradle, the build tool used to store the project.

Build script for 10:build.gradle,android Studio project

Top-level buildfile where you can add the configuration options common to all sub-projects/modules.  The code used to set the driver build process Buildscript {//Remote warehouse repositories//remote repository  dependent here is Jcenter jcenter ()} //declared using Android Studi o Gradle plugin version. dependencies {classpath ' com.android.tools.build:gradle:1.0.0 ' //Note:do not place your application Dependenci ES here; They belong //In the individual module Build.gradle files}}allprojects {repositories {jcenter ()}}   

11:external Libraries, which shows all the class libraries on which the project depends.

The above is basically the complete Android Studio project document structure, there are some IDE configuration files here we do not need attention.

Android Studio Project Structure

Related Article

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.