Android studio 运行出现Error running app: This version of Android Studio is incompatible with the Gradle

本文介绍了解决Android Studio因版本升级导致与Gradle插件不兼容的问题。通过禁用即时运行或更新IDE和Gradle插件版本,以及调整build.gradle文件中Gradle插件版本来解决该问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在项目打包调试过程,遇到提示这样的错误
这里写图片描述

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)

翻译一下:错误运行应用程序:这个版本的Android工作室与Gradle插件不兼容使用。尝试禁用即时运行(或更新IDE或Gradle插件的最新版本)。


**解释造成这种现象
`一般是android studio ide升级或者Gradle插件升级到最新的版本。我的是android studio版本升级导致的。


解决方案
新建一个app,找到app/build.gradle,复制 如;classpath ‘com.android.tools.build:gradle:2.2.3’替换原有报错的项目classpath配置
替换如下:


buildscript {
    repositories {
        jcenter()
    }
    dependencies {
//        classpath 'com.android.tools.build:gradle:2.3.0-alpha2'
//        classpath 'com.android.tools.build:gradle:2.3.0'
        classpath 'com.android.tools.build:gradle:2.2.3'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值