前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >安卓运行时异常:Error:Unable to start the daemon process

安卓运行时异常:Error:Unable to start the daemon process

作者头像
程序员飞飞
发布2022-05-09 10:32:46
8570
发布2022-05-09 10:32:46
举报
文章被收录于专栏:Android&Java技术Android&Java技术

(一)问题说明:在运行demo的时候就报如下错误

代码语言:javascript
复制
Error:Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at http://gradle.org/docs/2.2.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

(二)分析

将以上错误总结为:Android Studio 中 gradle 构建 堆栈空间不足,所以将其设置小一点即可,一般为1024或者512都可以,自己设置测试为准

(三)解决:

修改工程文件下的gradle.properties文件中的值如下即可

代码语言:javascript
复制
org.gradle.jvmargs=-Xmx1024m
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2017-01-13,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档