Android Studio 提示 Unsupported method: AndroidProject.getPluginGeneration()的解决方法

升级了Android Studio的工程到gradle 2.0后,在编译工程的时候提示以下错误:

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.

出现这个问题的原因是新版本的Android Studio会检查“ Instant Run” 这个特性,所以解决办法就是关掉这个检查。

Windows & Linux:

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

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

如图所示
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容