Gradle Building Android Projects

Source: Internet
Author: User

Tools:

Android Studio2.0

gradle-2.10

I.. gradle file

When we create a new Android project, Andriod Studio automatically creates multiple Gradle files and directories for us, with the following details:

Let's analyze each of these directories in the following sections:

Second, the Build.gradle under the app
Apply plugin: ' Com.android.application ' android {    compilesdkversion    buildtoolsversion "23.0.3"    defaultconfig {        ApplicationID "Xidian.dy.com.basicapp"        minsdkversion        targetsdkversion        Versioncode 1        versionname "1.0"    }    buildtypes {        release {            minifyenabled false            Proguardfiles getdefaultproguardfile (' proguard-android.txt '), ' Proguard-rules.pro '        }    }}dependencies {    Compile Filetree (dir: ' Libs ', include: [' *.jar '])    testcompile ' junit:junit:4.12 '    compile ' Com.android.support:appcompat-v7:23.4.0 '}

    • Apply plugin to declare the program, which declares it to be an Android app
    • Compilesdkversion 23来 claims to compile the SDK version used by the Android program
    • Buildtoolsversion "23.0.3"

Gradle Building Android Projects

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.