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之后再运行成功了。

你可能感兴趣的:(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))