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?
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
Image shown below. I'm only typing this because of a 30 character minimum imposed by Stackoverflow.
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)
Create new project in Android studio;
Press Ctrl+Shift+Alt+S
Proceed to "Project" section
You can see actual gradle version and android pluging version. Copy that to your project.
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
来源:https://stackoverflow.com/questions/25260172/how-to-check-the-gradle-version-in-android-studio