chefish
chefish

Reputation: 595

Can we change gradle plugin version in Android studio

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?

Upvotes: 4

Views: 28377

Answers (3)

Sandeep Pareek
Sandeep Pareek

Reputation: 1789

**Easy way

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


Upvotes: 1

Gabriele Mariotti
Gabriele Mariotti

Reputation: 363835

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.

Upvotes: 4

Shlublu
Shlublu

Reputation: 11027

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

enter image description here

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).

Upvotes: 12

Related Questions