I Have a Question.
In (Root)build.gradle Gradle Version is 3.1.3
(Root)build.gradle
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
In project-structure Gradle Version is 4.4
Project-Structure
Gradle version 4.4
In Gradle-wrapper-properties distributionUrl's Gradle Version is 4.4
Gradle-Wrapper-Properties
#Tue Jul 17 17:49:20 KST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
But I can Build and I can Run Application in SmartPhone.
What is real Gradle Version?
Please Reply.
Thanks.
You need to be clear about THREE things here:
Specifically speaking,
Android Gradle Plugin The Android Gradle Plugin is one of such gradle custom plugin. For the typical Android project, the version of this plugin can be configured in the top-level
build.gradle
.For each version of this plugin, it requires a minimum Gradle version as listed in this page gradle-plugin. For example, Android Gradle Plugin version 3.2.1 requires a minimal gradle version 4.6 which can be configured via Android Studio.
Gradle Wrapper. According to the official document Gradle Wrapper
This wrapper can be configured from
gradle-wrapper.properties
under your project directory. For example,Or from the Android Studio GUI as said in your question Project Structure Configuration.
You are confusing two different versions.
Indicates the version of the Android Gradle Plugin is 3.1.3. The other two fields are describing the version of the Gradle build system.
These can also be different, if you choose not to use the optional gradlew-wrapper (
gradlew
) tools. I highly recommend you do use them though, they make things much easier.This refers to the Android plugin for Gradle.
This and all the other versions are for Gradle itself.
Gradle and the Android plugin for Gradle are two different pieces of software and so have different version numbers.