Android Studio报错:Unable to start the daemon process: could not reserve enough space for object heap

最近在使用Android Studio的时候,爆出了这么一个问题:
Error:Unable to start the daemon process: could not reserve enough space for object heap.
Please assign more memory to Gradle in the project's gradle.properties file.
For example, the following line, in the gradle.properties file, sets the maximum Java heap size to 1,024 MB:
<em>org.gradle.jvmargs=-Xmx1024m</em>

<a href="http://www.gradle.org/docs/current/userguide/build_environment.html">Read Gradle's configuration guide</a><br><a href="http://docs.oracle.com/javase/7/docs/technotes/guides/vm/gc-ergonomics.html">Read about Java's heap size</a>

提示内存空间不足.可是我8g的内存就开了个qq和android studio 怎么会内存不足呢.记得没换系统之前程序还是能用.换过系统之后.android studio没有重新安装.就不能用了.奇怪的问题,后来在stackoverflow.com 上找到了这个问题的解决办法:

Do Following steps:

  1. Start Android Studio.
  2. Close any open project.Go to File > Close Project.(Welcome window will open)
  3. Go to Configure > Settings.
  4. On Settings dialog,select Compiler (Gradle-based Android Projects) from left and set VM Options to -Xmx512m(i.e. write -Xmx512m under VM Options:) and press OK.
虽然是英语,但是小白的我都看懂了按照他说的做了之后立马就好了.感谢大神

修改完毕.依然报此错误的话.最好重启一下电脑

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值