How to check the gradle version in Android Studio?

Android Gradle-PluginVersion

Android Gradle-Plugin Problem Overview


When compiling this official project with Android Studio 0.82, it shows error note:

Error:The project is using an unsupported version of the Android Gradle plug-in (0.9.2)

After some searching, I decide to manually change content in the build.gradle file in line

classpath 'com.android.tools.build:gradle:0.9.+'

to the gradle version that is installed in Android Studio.

The question is, can how to check the gradle version in my Android Studio?

Android Gradle-Plugin Solutions


Solution 1 - Android Gradle-Plugin

File->Project Structure->Project pane->"Android plugin version".

Make sure you don't confuse the Gradle version with the Android plugin version. The former is the build system itself, the latter is the plugin to the build system that knows how to build Android projects

Solution 2 - Android Gradle-Plugin

Image shown below. I'm only typing this because of a 30 character minimum imposed by Stackoverflow.

enter image description here

Solution 3 - Android Gradle-Plugin

I'm not sure if this is what you ask, but you can check gradle version of your project here in android studio:

(left pane must be in project view, not android for this path) app->gradle->wrapper->gradle-wrapper.properties

it has a line like this, indicating the gradle version:

distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-all.zip

There is also a table at the end of this page that shows gradle and gradle plug-in versions supported by each android studio version. (you can check your android studio by checking help->about as you may already know)

Solution 4 - Android Gradle-Plugin

  1. Create new project in Android studio;

  2. Press Ctrl+Shift+Alt+S

  3. Proceed to "Project" section

  4. You can see actual gradle version and android pluging version. Copy that to your project.

Solution 5 - Android Gradle-Plugin

You can install andle for gradle version management.

It can help you sync to the latest version almost everything in gradle file.

Simple three step to update all project at once.

1. install:

    $ sudo pip install andle

2. set sdk:

    $ andle setsdk -p <sdk_path>

3. update depedency:

    $ andle update -p <project_path> [--dryrun] [--remote] [--gradle]

--dryrun: only print result in console

--remote: check version in jcenter and mavenCentral

--gradle: check gradle version

See https://github.com/Jintin/andle for more information

Solution 6 - Android Gradle-Plugin

I know this is really old and most of the folks have already answered it right. Here are at least two ways you can find out the gradle version (not the gradle plugin version) by selecting one of the following on project tab on left:

  1. Android > Gradle Scripts > gradle-wrapper.properties (Gradle Version) > distributionURL
  2. Project > .gradle > x.y.z <--- this is your gradle version

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser2718067View Question on Stackoverflow
Solution 1 - Android Gradle-PluginScott BartaView Answer on Stackoverflow
Solution 2 - Android Gradle-PluginAdam JohnsView Answer on Stackoverflow
Solution 3 - Android Gradle-PlugingezgingunView Answer on Stackoverflow
Solution 4 - Android Gradle-PluginYury FinchenkoView Answer on Stackoverflow
Solution 5 - Android Gradle-PluginJintinView Answer on Stackoverflow
Solution 6 - Android Gradle-PluginKnight ForkedView Answer on Stackoverflow