您的位置:首页 > 其它

编译ionic应用时遇到“To run dex in process, the Gradle daemon needs a larger heap.”

2016-09-20 14:18 633 查看
报错:

To run dex in process, the Gradle daemon needs a larger heap.
It currently has approximately 910 MB.
For faster builds, increase the maximum heap size for the Gradle daemon to more than 2048 MB.
To do this set org.gradle.jvmargs=-Xmx2048M in the project gradle.properties.
For more information see https://docs.gradle.org/current/userguide/build_environment.html[/code] 
由于gradle编译时的内存资源不足,需要配置更大的内存资源。

再项目根目录查找gradle.properties这个文件,如果没有就新建一个,加入以下内容

org.gradle.daemon=true #就是让你让你编译时使用守护进程。
org.gradle.parallel=true #使用并行编译
org.gradle.jvmargs=-Xmx2048m #JVM最大允许分配的堆内存,按需分配
-XX:MaxPermSize=512m #JVM最大允许分堆非内存,
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  gradle ionic
相关文章推荐