Cold Fire Cold Fire - 1 year ago 2774
Android Question

Unsupported method: AndroidProject.getPluginGeneration() while running project

I'm trying to run my Project with Android Studio 2.2 but I get this error

Unsupported method: AndroidProject.getPluginGeneration().
The version of Gradle you connect to does not support that method.

I am using ButterKnife 8.4.0

My app gradle.file:

buildscript {
repositories {
dependencies {
classpath ''
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'

My module gradle file:

apply plugin: ''
apply plugin: 'android-apt'

android {
compileSdkVersion 23
buildToolsVersion "23.0.3"

defaultConfig {
applicationId "xxx.xx"
minSdkVersion 10
targetSdkVersion 23
versionCode 1
versionName "1.0"

dependencies {
compile 'com.jakewharton:butterknife:8.4.0'
apt 'com.jakewharton:butterknife-compiler:8.4.0'

Why does it not work and how do I solve it?

Answer Source

General Issue:-

It can occur because AS was checking availability of the Instant Run feature. The fixed is to disable Instant Run:


Android Studio -> Preferences -> Build, Execution, Deployment -> Instant Run


File -> Settings -> Build, Execution, Deployment -> Instant Run.


Android Studio -> Preferences -> Build, Execution, Deployment -> Instant Run.

enter image description here

Thanks to @pophus for mentioning this.

Use this Steps If you are using a butterknife:-

If you are using the new Jack compiler with version 2.2.0 or newer, you do not need the 'android-apt' plugin and can instead replace apt with annotationProcessor when declaring the compiler dependency.

That is, remove

classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'

from your main gradle file

And remove

apply plugin: 'android-apt'

from your main module file

and replace

apt 'com.jakewharton:butterknife-compiler:8.4.0'


annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download