无法为对象堆保留足够的空间

无法为对象堆保留足够的空间

本文介绍了Android Gradle 无法为对象堆保留足够的空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了 Android Studio 1.1.0.我还没有做任何事情,比如启动新的 Android 应用程序或导入任何东西.不知何故,它正在尝试构建某些东西并引发同步错误.

错误:无法启动守护进程.此问题可能是由守护程序的错误配置引起的.例如,使用了无法识别的 jvm 选项.请参阅

I've installed Android Studio 1.1.0. I haven't done anything yet like start new Android application or import anything. Somehow it is trying to build something and it throws sync error.

I've already checked at gradle.org/.../gradle_daemon.html but couldn't find anything that helps me to solve the problem.

It isn't a memory problem because I've 8GB of physical memory and no other program running.

解决方案

For Android Studio 1.3 : (Method 1)

Step 1 : Open gradle.properties file in your Android Studio project.

Step 2 : Add this line at the end of the file

org.gradle.jvmargs=-XX:MaxHeapSize=256m -Xmx256m

Above methods seems to work but if in case it won't then do this (Method 2)

Step 1 : Start Android studio and close any open project (File > Close Project).

Step 2 : On Welcome window, Go to Configure > Settings.

Step 3 : Go to Build, Execution, Deployment > Compiler

Step 4 : Change Build process heap size (Mbytes) to 1024 and Additional build process to VM Options to -Xmx512m.

Step 5 : Close or Restart Android Studio.

这篇关于Android Gradle 无法为对象堆保留足够的空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 01:18