Error running app: This version of Android Studio is incompatible with the Gradle Plugin used. Try disabling Instant Run (or updating either the IDE or the Gradle plugin to the latest version)

问题描述:

我在gitHub上新下载了一个Demo,运行时候报出这个错误:

Error running app: This version of Android Studio is incompatible with the Gradle Plugin used. Try disabling Instant Run (or updating either the IDE or the Gradle plugin to the latest version)

原因:它的gradle版本是3.3的,而我的gradle版本是2.1.1的。

解决办法:

我先手动修改了一下gradle-wrapper.properties 中的版本,把它的3.3修改成为我的2.1.1可是还是有问题,运行不成功。

然后我通过查阅,修改AndroidStudio中的Settings--->Build,Execution,Deployment-->Instant Run 把 Enable Instant Run to hot swap code/resoure changes deploy(default enabled)的选项给移除,clean之后再运行成功了。

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

推荐阅读更多精彩内容