How to check the gradle version in Android Studio?

后端 未结 6 1631
名媛妹妹
名媛妹妹 2020-12-07 15:42

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 pl         


        
相关标签:
6条回答
  • 2020-12-07 15:48

    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

    0 讨论(0)
  • 2020-12-07 16:03

    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

    0 讨论(0)
  • 2020-12-07 16:05

    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
    0 讨论(0)
  • 2020-12-07 16:11

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

    enter image description here

    0 讨论(0)
  • 2020-12-07 16:13

    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)

    0 讨论(0)
  • 2020-12-07 16:13
    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.

    0 讨论(0)
提交回复
热议问题