将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进行更新