Unsupported method: AndroidProject.getPluginGeneration() while running project

后端 未结 7 1184
青春惊慌失措
青春惊慌失措 2020-12-07 15:20

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 yo         


        
7条回答
  •  死守一世寂寞
    2020-12-07 15:53

    General Issue:-

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

    Windows & Linux:

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

    Mac:

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

    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'
    

    with

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

提交回复
热议问题