Where can I find latest gradle version in android studio?
Use + sign instead of version no. It will automatically picks the latest one available
dependencies {
classpath 'com.android.tools.build:gradle:+'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
See here for release/version information of gradle android plugin: https://bintray.com/android/android-tools/com.android.tools.build.gradle/view
But if you want to install a specific version.Check the url below.
https://services.gradle.org/distributions/
Here you can found the one you required. FYI beta versions are not available.
Inside your Android Studio's project tree, open the file gradle/wrapper/gradle-wrapper.properties. Change this entry to the one you need:
distributionUrl=http://services.gradle.org/distributions/gradle-2.1-all.zip
As per official documents : You should not use dynamic dependencies in version numbers, such as 'com.android.tools.build:gradle:2.+'. Using this feature can cause unexpected version updates and difficulty resolving version differences.
If the specified plugin version has not been downloaded, Gradle downloads it the next time you build your project or click Tools > Android > Sync Project with Gradle Files from the Android Studio menu bar.
Update Gradle
When you update Android Studio, you may receive a prompt to also update Gradle to the latest available version. You can choose to accept the update or manually specify a version based on your project's build requirements.
The following table lists which version of Gradle is required for each version of the Android plugin for Gradle. For the best performance, you should use the latest possible version of both Gradle and the Android plugin.
Plugin version Required Gradle version
1.0.0 - 1.1.3 2.2.1 - 2.3
1.2.0 - 1.3.1 2.2.1 - 2.9
1.5.0 2.2.1 - 2.13
2.0.0 - 2.1.2 2.10 - 2.13
2.1.3 - 2.2.3 2.14.1+
2.3.0+ 3.3+
For More information Click here
This error is for Android Plugin Version for gradle, not Gradle Version!
Gradle Version
You can find all gradle release versions at its github release page( Read Upgrade Instructions section)
You should set gradle version in gradle-wrapper.properties
file:
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip
Or from Android Studio: file>Project Structure>Project>gradle version
Android plugin version
But Android plugin version for gradle depends on Android Studio & Gradle version and Android Studio prompt you to update it ( if you open an old project or if you update your android studio)
You can find its version at Android Plugin for Gradle Release Notes
You can specify the Android plugin for Gradle version in either the File > Project Structure > Project menu in Android Studio, or the top-level build.gradle file. The following example sets the Android plugin for Gradle to version 2.3.3 from the build.gradle file:
buildscript {
...
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
}
}