Android Studio 在 gradle 2.10 和 gradle plugin 2.0.0-alpha5 中无法正常工作 [英] Android Studio doesn't work fine with gradle 2.10 and gradle plugin 2.0.0-alpha5

查看:23
本文介绍了Android Studio 在 gradle 2.10 和 gradle plugin 2.0.0-alpha5 中无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在更新到 Android Studio 2.0 预览版 5 之前,我使用 com.android.tools.build:gradle:2.0.0-alpha3 和 gradle 2.8.它工作正常.

I use com.android.tools.build:gradle:2.0.0-alpha3 and gradle 2.8 before I update to Android Studio 2.0 preview 5. It works fine.

更新到 2.0 预览版 5 后,它告诉我更新到 com.android.tools.build:gradle:2.0.0-alpha5 和 gradle 2.10.

After I update to 2.0 preview 5,it tells me to update to com.android.tools.build:gradle:2.0.0-alpha5 and gradle 2.10.

我现在无法正常构建和运行我的应用程序.它总是使用我的代码的旧副本,尽管我已经更改了代码并且花费了更多的时间来构建.

I can't build and run my app normally now. It always uses a old copy of my code though I have changed the code and costs more time to build.

如果我回到 com.android.tools.build:gradle:2.0.0-alpha3 和 gradle 2.8.它变得正确.

If I turn back to com.android.tools.build:gradle:2.0.0-alpha3 and gradle 2.8.It become right.

Android Studio 版本 (http://tools.android.com/recent)

Android Studio Version (http://tools.android.com/recent)

Android Gradle 插件版本 (http://tools.android.com/技术文档/新构建系统)

Android Gradle Plugin Version (http://tools.android.com/tech-docs/new-build-system)

Android Studio Preview 6 于 2016 年 1 月 21 日发布.Android Studio Preview 7 于 2016 年 1 月 23 日发布.

Android Studio Preview 6 was posted on Jan 21, 2016. Android Studio Preview 7 was posted on Jan 23, 2016.

您可以看到 Android Studio Preview 更新频繁.如果不想处理各种bug,最好使用稳定版.

You can see that the Android Studio Preview updates frequently. If you don't want to deal all kinds of bugs, you would better to use a stable version.

如果您想使用更多功能,请始终保持最新版本以避免出现错误.

If you want to use more features, you should always keep latest version to avoid bugs.

推荐答案

你的问题是即时运行,因为如果项目构建和 APK 安装,它不可能是 Gradle 问题.

Your problem is with instant run, because if project builds and APK installs, it can't be Gradle issue.

Instant Run 仍在开发中,存在无法正常工作的问题.

Instant Run is still under development and has this issue of not working properly.

要禁用即时运行:

  1. 打开属性,
  2. 转到编辑器>构建、执行、开发>即时运行
  3. 取消选中启用即时运行以热插拔代码

这篇关于Android Studio 在 gradle 2.10 和 gradle plugin 2.0.0-alpha5 中无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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