此版本的 android studio 与使用的 gradle 版本不兼容.尝试禁用即时运行 [英] This version of android studio is incompatible with the gradle version used.Try disabling the instant run

查看:45
本文介绍了此版本的 android studio 与使用的 gradle 版本不兼容.尝试禁用即时运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够正确构建应用程序,但是当我运行它时出现以下错误:

I am able to build the app properly, but when I run it I get this error:

This version of android studio is incompatible with the gradle version used.Try disabling the instant run

推荐答案

您可以使用正常的构建运行而不是即时运行.

You can use normal build run rather than instant run.

先检查

转到设置/首选项 > 构建、执行、部署选项 > 即时运行取消选中所有三盒.

Go to Settings/Preferences > Build, Execution, Deployment option > Instant Run and uncheck all the three boxes.

  1. 升级 Gradle 服务 URL:

  1. Upgrading Gradle services URL:

项目 > Gradle > Wrapper > gradle-wrapper.properties

Project > Gradle > Wrapper > gradle-wrapper.properties

更改网址来自

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

distributionUrl=https\://services.gradle.org/distributions/gradle-2.11-all.zip

(在这里找到最新的发行版Url gradle插件版本:http://services.gradle.org/distributions

(Find latest distributionUrl gradle plugin version Here: http://services.gradle.org/distributions

**确保使用 gradle-x.xx-all.zip)

**Make sure to use gradle-x.xx-all.zip )

  1. 删除你的构建文件夹

  1. Delete your build folder

运行项目时,会自动创建build文件夹

When you run project, build folder will be created automatically

转到菜单中的 BUILD 选项 > Clean the project, Build the project

Go to BUILD option in menu > Clean the project, Build the project

它应该可以在没有即时运行的情况下工作.

It should work without instant run.

这篇关于此版本的 android studio 与使用的 gradle 版本不兼容.尝试禁用即时运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆