[Android Studio authoritative tutorial] AS build system-Gradle, android-gradle

Source: Internet
Author: User

[Android Studio authoritative tutorial] AS build system-Gradle, android-gradle

In the previous articles, we mainly talked about the configuration of AS. Today, we will start to understand the [build system]-Gradle of Android Studio.

What is Gradle? Gradle is based on the Groovy language and mainly oriented to Java applications. An automated build tool based on DSL (domain-specific language) syntax. [Baidu encyclopedia]

Contains a top-level Build File and each module Build File in AS, such

Here we will focus on [top-level configuration files, module configuration files, and sdk configuration files]

1. level Configuration File

2. module configuration file

Note:
minifyEnable falseApk means: For detailed configuration reference: [Android Studio-automatically delete unused resources, to reduce the apk weight]

Since the module is described as follows, there are generally three dependency relationships. The six methods for adding dependency relationships are described in detail here:
[[Android Studio authoritative tutorial] AS six methods for adding third-party libraries (Jar, module, so, etc )]

Dependencies {// Module (Module) depends on compile project (": lib") // remote binary dependency on compile 'com. android. support: appcompat-v7: 19.0.1 '// Local Binary dependency compile fileTree (dir: 'libs', include :['*. jar '])}
3. SDK and NDK configuration file

Two paths are configured here: the first is the sdk and the second is the ndk. We can configure them in the Project StrucTrue button:

The basic understanding of Gradle has been here for a long time. We will talk about multi-channel packaging, ndk configuration, and so on later, so there will be no problems with development, in the next article, we will talk about the AS signature packaging Apk and the generation of the jks signature file.

If you are interested, follow my Blog. My column will continue to update the Android Studio tutorial and the NDK configuration and compilation at the 2015 I/O conference, I will share it with you all.
I also received an invitation from CSND lecturers. Later I will record these Android Studio tutorials as videos and publish them to the CSDN Institute.

/*** -------------- * Welcome to reprint | reprinted please note * -------------- * if it is helpful to you, please click | top | * -------------- * Please keep humble | you will go further * -------------- * @ author zsl * @ github https://github.com/yy1300326388 * @ blog http://blog.csdn.net/yy1300326388 */

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.