当前位置: 移动技术网 > IT编程>移动开发>Android > android studio Error:Unable to start the daemon process 报错问题的解决办法

android studio Error:Unable to start the daemon process 报错问题的解决办法

2018年11月25日  | 移动技术网IT编程  | 我要评论

我在用android studio 做一个小项目,在家里的mac电脑中创建项目,并同步到coding.net中。

到公司电脑中下拉此项目,并通过android studio打开,可打开后的项目报如下错误:

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 https://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.  

当然,试图编译或运行,都是不成功的。

经google发现,原来android studio是通过gradle对项目配置的,而中没有对android studio 的默认配置,就像eclipse中的eclipse.ini文件。

解决方法:

在操作系统当前用户的.gradle文件夹下:c:\users\administrator\.gradle 设置gradle.properties,若无就新增。

在文件中添加如下配置信息:

org.gradle.jvmargs=-xmx512m  

重启项目,问题解决。

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网