如何让gradle更快 [英] How to make gradle faster

查看:129
本文介绍了如何让gradle更快的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 8.1上安装了android sdk和gradle。
$ b 这太慢了,因为构建工具需要太多时间。



我可以摆脱gradle吗?



我还能如何让它更快?



1)在设置 - >生成 - >编译器中添加一些东西,这可能有点帮助: 命令行选项




  • - offline --parallel



    VM选项
  • -Xmx2048m -XX:MaxPermSize = 512m- -



2)在文件gradle.properties中添加一行 org.gradle.daemon = true



3)试试 Genymotion 模拟器。



<4>将项目移动到SSD磁盘。或者闪存盘 - 构建时间可能会减少一半。


最后一个选项根本不是使用AS和Gradle。切换到Eclipse(创建新项目,移动res和src文件+导入您使用的所有库,例如NDK更容易在那里设置),但它也不像AS那样沉重且最新,因此可能并不多毕竟有帮助。


I installed the android sdk and gradle on Windows 8.1.

It is too slow because the build tool takes too much time.

Can I get rid of gradle?

How else can I make it faster?

解决方案

There are some thing, which could help a bit:

1) In Settings->Build->Compiler and add Command line options:

  • --offline --parallel

    and VM options:

  • -Xmx2048m -XX:MaxPermSize=512m- -

2) In the file gradle.properties add line org.gradle.daemon=true

3) Give a try to Genymotion emulator.

4) Move project to SSD disk. Or flash disk - build time can drop to half.

Last option is not to use AS and Gradle at all. Switch to Eclipse (make new project, move res and src files + import all libraries you using, for example NDK is easier to set up there), but it's also not that "heavy" and up to date as AS, so probably not much helpful after all.

这篇关于如何让gradle更快的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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