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