How to install gradle version in Android studio 1.3?

I updated android studio to version 1.3. In my project, I need to use gradle version 2.2.1 and android gradle plugin version 1.0.0. How can I configure Android studio to automatically use gradle version 2.2.1?

I set the gradle shell properties to 2.2.1, and the project structure also shows that it uses gradle version 2.2.1

gradle -wrapper.properties

#Wed Apr 10 15:27:10 PDT 2013 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle2.2.1-all.zip 

Output:

Error: Gradle 2.4 requires Android gradle plugin 1.2.0 (or newer), but the project uses version 1.0.0. Please use Android gradle plugin 1.2.0 or Fix plugin version and synchronization project

I want to use gradle 2.2.1, but it keeps jumping on 2.4

+6
source share
3 answers

I was getting the same error in Android Studio, and it turned out that Android Studio pointed to its own version of gradle instead of my gradle project shell.

For Windows Android Studio, go to File> Preferences> Build, Run, Deploy> Build Tools> Gradle and change it to "Use the default shell gradle (recommended)."

This is fixed for me without changing the dependency. Hope this is all you need.

+16
source

In your build.gradle project (NOT your application module) make sure that it uses the tools to build android gradle in 1.2.0 or higher. Therefore, in your file, the dependency section should look something like this:

 dependencies { classpath 'com.android.tools.build:gradle:1.3.+' } 

If you always want to use the latest gradle build tools, change it to:

 dependencies { classpath 'com.android.tools.build:gradle:+' } 

From OP:

This dosnt solves my problem. I need a custom plugin version 'com.android.tools.build: gradle: 1.0.0' in my project, so I installed it in this build.gradle file of the project. The problem is that this worked using gradle 2.2.1, but since android studio 1.3 uses gradle 2.4, it does not work. So I need to somehow get android studio to use gradle version 2.2.1, so I can use gradle plugin 1.0.0.

+3
source

It is recommended to use the latest Gradle , so Android Studio warns about updating to the latest version.

Why do you want to return to the old version?

Note. . If you think that a newer version will create any complication in your stable code, they will be sure that this will not harm your code. And you cannot get the extra benefit from the old version. A newer version means a more efficient and error-free thing.

+1
source

All Articles