Can we change gradle plugin version in Android studio

22,140

Solution 1

The standard way is to go to "File/Project Structure":

and then to set your plugin configuration in the "Project" section of the window that opens:

enter image description here

(You can also directly modify your gradle files).

Solution 2

Each project (but you can force each module) can use a different version.

You can define the plugin inside the build.gradle file in the project (root level, or inside the module).

For example:

  classpath 'com.android.tools.build:gradle:1.3.1'
  classpath 'com.android.tools.build:gradle:1.5.0'

Otherwise you can use the menu in:

File -> Project Structure -> Project.

It will edit automatically the same build.gradle file.

Solution 3

**Easy way

Just Open Gradle -> wrapper and change vercion to 5.5.1 and delete gradle -wrapper.jar and run Your Project


Share:
22,140

Related videos on Youtube

chefish
Author by

chefish

Updated on July 09, 2022

Comments

  • chefish
    chefish 3 months

    My Android studio is 1.5.1 and I found 1.3.0 and 1.5.0 in

    /Applications/Android Studio.app/Contents/gradle/m2repository/com/android/tools/build/gradle

    But I'd like to user gradle plugin 1.1.0, I changed the gradle version in build.gradle. But it is userless, so how can I change the gradle plugin version?

  • chefish
    chefish over 6 years
    but in the path /Applications/Android Studio.app/Contents/gradle/m2repository/com/android/tools/bu‌​ild/gradle, plugin 1.1.0 is not exist
  • Shlublu
    Shlublu over 6 years
    @chefish You must have a more recent version available in that case. It is best to upgrade when an update is available anyway. Should you absolutely need the 1.1.0, you'll have to install it first.

Related