机器人工作室1.2摇篮很慢 [英] android studio 1.2 gradle is very slow

查看:178
本文介绍了机器人工作室1.2摇篮很慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

它一直是我使用Android的工作室了一会儿,到现在为止我用的是1.0.1, 摇篮有点慢,约1.5分钟的时间assembleDebug(我的项目是非常大的!) 但今天我更新了AS 1.2,现在同样的过程,即使没有结果大约需要7到10分钟,有时!

it's been a while that I'm using Android Studio, and up until now I was using 1.0.1, gradle was a bit slow, around 1.5 minute for assembleDebug (my project is really big!) but today I updated my AS to 1.2 and now same process takes about 7 to 10 minutes, and sometimes even with no result!

有没有设定我必须改变,使其更快? 说实话需要10分钟的时间每次调试运行是一场噩梦!

is there any setting I have to change to make it faster ? honestly taking 10 minute for every debug run is a nightmare !

此外的大部分时间,我的CPU使用率是以防万一的10%! (它实际上是闲置的!) 当摇篮是工作之前,原因是100%,几乎所有的时间

Also most of the time, my cpu usage is arround 10 percent! (it is actually idle!) cause before when gradle was working it was on 100% almost all the time

推荐答案

有同样的问题。

我所做的是改变全球摇篮设置为脱机工作,这可以通过将preferences =>摇篮来完成。这确实有所作为。

What I did was to change the global gradle settings to offline work which can be done by going to Preferences => Gradle. This did make a difference.

另一种哪种方法我看到有人用,但我还没有使用的是创建的 gradle.properties 的在摇篮文件夹,如下所示:

Another method I have seen people use, but which I have not used yet is to create a gradle.properties in the gradle folder like so:

就在下面的目录中创建一个名为gradle.properties:

Just create a file named gradle.properties in the following directory:

/home/<username>/.gradle/ (Linux)
/Users/<username>/.gradle/ (Mac)
C:\Users\<username>\.gradle (Windows)

添加此行到文件:

org.gradle.daemon=true

请检查<一href="http://stackoverflow.com/questions/16775197/building-and-running-app-via-gradle-and-android-studio-is-slower-than-via-eclips/19500539#19500539">this链接更多的选择,以及关于加快摇篮的详细解释

Please check out this link for more options as well as a detailed explanation on speeding up gradle.

希望这有助于!

这篇关于机器人工作室1.2摇篮很慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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