解决UnsupportedMethodException: Unsupported method: AndroidProject.getPluginGeneration().

来源:互联网 发布:贪吃枫淘宝店 编辑:程序博客网 时间:2024/05/17 05:52
问题:Unsupported method: AndroidProject.getPluginGeneration().
         The version of Gradle you connect to does not support that method.
         To resolve the problem you can change/upgrade the target version of Gradle you connect to.

         Alternatively, you can ignore this exception and read other information from the model.


原因:

显然是版本低了,网上说修改Settings的Instant Run做法建议不要尝试了。


解决办法:

把工程Project的gradle文件里面的gradle版本修改到正常可用的版本号,比如我的是:2.2.3


buildscript {    repositories {        jcenter()    }    dependencies {        classpath 'com.android.tools.build:gradle:2.2.3'        // NOTE: Do not place your application dependencies here; they belong        // in the individual module build.gradle files    }}


0 0