Reputation:
I am trying to run a project and it shows me:
Error running app: This version of Android Studio is incompatible with the Gradle Plugin used. Try disabling Instant Run (or updating either the IDE or the Gradle plugin to the latest version)
What should I do?
How can I update gradle?
Upvotes: 0
Views: 15795
Reputation: 4499
For automatic update, you may set the version in Android Studio > File > Project Structure > Project > Android Plugin Version
Please note that you might also need to update Gradle Version
. For gradle and gradle plugin compatibility, you may refer to the docs.
Sync gradle afterwards. This will automatically set the distribution URL as well.
Upvotes: 4
Reputation: 363439
The gradle plugin is declared inside the build.gradle file in your modules or in your root folder (top-level file).
Use:
classpath 'com.android.tools.build:gradle:2.0.0'
Also this requires gradle 2.10 (don't confuse the gradle plugin with gradle).
The gradle version is defined in gradle/wrapper/gradle-wrapper.properties
.
Use:
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
Upvotes: 3