UnsupportedMethodException Unsupported method: AndroidProject.getPluginGeneration().

将Android Studio升级到最新版本后,没有升级build-tools,无法使用instant run功能,导致运行项目时,报这个错:

UnsupportedMethodException
         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.


解决的方法:

方法1、可以关掉instant run功能

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

去掉打勾:Enable Instant Run to hot swap code/resource changes on deploy(default enabled)




方法2、可以升级build-tools;

打开SDK Manager进行更新

阅读更多
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭