如何修复 Android Studio 在执行 Gradle 任务时卡住的问题? [英] How to fix Android Studio getting stuck executing Gradle tasks?

查看:37
本文介绍了如何修复 Android Studio 在执行 Gradle 任务时卡住的问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试构建/运行项目以及清理它时,Android Studio(测试版)0.8.6 卡住了.它保持响应,但 Gradle: Executing Tasks 消息不会消失(超过 20 分钟是我放弃的时候)并且应用程序永远不会运行.

Android Studio (Beta) 0.8.6 gets stuck when I try to build/run the project, as well as clean it. It stays responsive, but the Gradle: Executing Tasks message doesn't disappear (longer than 20 minutes is when I give up) and the app never runs.

这是我尝试的:

  • 使缓存无效/重新启动

  • Invalidate caches/restart

强制退出并重启

从应用程序中删除它(在 Mac 上)并从官方网站重新下载.

Remove it from Applications (on Mac) and re-download it from the official website.

推荐答案

通过转到 Android Studio -> Preferences -> Gradle 修复它> -> 并勾选 Offline work.仍然不知道出了什么问题,但至少现在它可以编译了.

Fixed it by going to Android Studio -> Preferences -> Gradle -> and ticking Offline work. Still have no idea what was wrong, but at least now it compiles.

在新的 Android Studio 版本中,路径是 File -> Other Settings -> Default Settings -> Build-Excecution-Deployment -> Gradle

In new Android Studio Versions the path is File -> Other Settings -> Default Settings -> Build-Excecution-Deployment -> Gradle

这篇关于如何修复 Android Studio 在执行 Gradle 任务时卡住的问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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