Error:Unable to start the daemon process. This problem might be caused by incorrect configuration of

解决Gradle编译错误
本文介绍了两种解决Gradle编译时出现“Unable to start the daemon process”错误的方法。第一种方法是删除并重新创建.gradle目录;第二种方法是设置系统变量_JAVA_OPTIONS。这两种方法适用于不同的情况。





  1. Error:Unable to start the daemon process.
  2. This problem might be caused by incorrect configuration of the daemon.
  3. For example, an unrecognized jvm option is used.
  4. Please refer to the user guide chapter on the daemon at http://gradle.org/docs/2.2.1/userguide/gradle_daemon.html
  5. Please read the following process output to find out more:


方法一:
这个错误是编译时出现的错误,你将安装C盘的.gradle目录删除掉,不要担心删除会有什么问题。大胆的删!在清理下,它就会自动生成,问题解决.。

当然,试图编译或运行,都是不成功的。
经google发现,原来android studio是通过gradle对项目配置的,而系统中没有对android studio 的默认配置,就像Eclipse中的eclipse.ini文件。

解决方法:

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

在文件中添加如下配置信息:
org.gradle.jvmargs=-Xmx512m

方法二:
新建系统变量
变量名 _JAVA_OPTIONS
变量值 -Djava.net.preferIPv4Stack=true
网上的方法 修改或者配置gradle文件没有成功解决的 可以试试这个方法!

参考连接:

第一种方式(网上很多人都说用第一种方式解决了,但并不适用与我的电脑):

https://blog.csdn.net/u010039540/article/details/52998093

第二种方式(我用的第二种方式解决的):

https://blog.csdn.net/like_lgg/article/details/79140064



评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值