Android Studio 版本与使用的 Gradle 插件不兼容

Version of Android Studio is incompatible with the Gradle Plugin used

在我的设备(或模拟设备)上尝试 运行 应用程序时,我不断收到相同的错误:

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。

我正在尝试一些 Gradle 设置 - 使用默认 Gradle 包装器 ,或 使用 Gradle 包装器任务配置 - 没有变化。

gradle-wrapper.properties

distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-bin.zip

build.gradle

classpath 'com.android.tools.build:gradle:2.2.0-alpha6'

它是 github 的开源项目。没有其他人抱怨这一点。

我正在研究 Ubuntu 15.10,所以 gradle --version 命令可能是有用的信息,

------------------------------------------------------------
Gradle 1.5
------------------------------------------------------------

Gradle build time: niedziela, 16 listopad 2014 16:24:40 UTC
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.9.4 compiled on January 27 2015
Ivy: non official version
JVM: 1.7.0_95 (Oracle Corporation 24.95-b01)

编辑:哦,我也尝试在配置中禁用 Instant 运行
EDIT2: 我同时进行的另一个项目没有问题,但是每个设置都是一样的,所以我真的不知道该怎么做。

此问题可能是由 IDE/Gradle 错误引起的!尝试将 Gradle 版本切换到最新版本或降级到稳定版本,

Latest version: 2.2.0-beta2

Last stable version: 2.1.3

您也可以尝试其他版本,check here

清理项目并删除构建文件夹...这可能会解决问题。

还要看看