Issues with Gradle version changes

Source: Internet
Author: User

Learn about the three + concepts

Gradle, Gradle wrapper, Gradle plugin

(1) Gradle: A project building tool to manage a project's dependency rack package. The nature is similar to maven.

(2) Gradle wrapper: The Gradle version used to unify the project.

The Gradle/wrapper/gradle-wrapper.properties file is configured as follows:

#Tue Sep 19:31:03 CST 2016distributionbase=gradle_user_home     rules to understand where the GRADLE pack is placed after pressure distributionpath=wrapper/ Distszipstorebase=gradle_user_home         Specifies where GRADLE's zip package is placed, and Gradle_user_home defaults to C:\Users\Administrator\. Gradlezipstorepath=wrapper/distsdistributionurl=https\://services.gradle.org/distributions/gradle-2.10-all.zip     specifies which version of Gradle is used to compile the project

This file specifies the Gradle version of the project to which it is compiled, ensuring that all developers compile with the same version of the compilation tool in the project.

(3) Gradle plugin, Gradle plugin, is a plugin developed by Android Studio to facilitate the configuration and compilation of Gradle, which follows the evolution of the Gradle version.

In Android Studio, the following code is configured in Build.gradle in the root directory of the project

Buildscript {    repositories {        jcenter ()    }    dependencies {        classpath ' com.android.tools.build: gradle:2.1.0 '       Specifies the Gradle plug-in version 2.1.0.    }}
During the compilation process, if the Gradle plug-in version does not match the Gradle version, the compilation will fail.

Version change

(1) Gradle version changes when using as:

Modify the version of the Gradle plugin plugin used to match the version of the gradle that you want to change. See

Modify Distributionurl in Gradle-wrapper.properties to specify the version of Gradle that you want to change.

Issues with Gradle version changes

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.