AndroidStudio运行项目出现Unsupported method: AndroidProject.getPluginGeneration()错误解决办法

早上打开项目一运行就报以下错误:

 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.

解决办法:

第一次遇见这个错误,就上网查找,找到解决的方法:


在设置界面,根据图中指示,将箭头所指方向的选择框去掉选择,重新运行项目就解决了,如果这个方法无法解决你的问题,那你只能在去寻找其他的解决方法。

本人亲测好使。