Java android studio 错误:无法启动守护进程
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/39910770/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
android studio Error:Unable to start the daemon process
提问by david-za
Version of Android Studio 2.2 OS version: Windows 10 Java JRE/JDK version: 1.8.0_51
Android Studio 2.2 操作系统版本:Windows 10 Java JRE/JDK 版本:1.8.0_51
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://docs.gradle.org/2.14.1/userguide/gradle_daemon.htmlPlease
read the following process output to find out more:
----------------------- Error occurred during initialization of VM Could not reserve enough space for 1572864KB object heap
错误:无法启动守护进程。此问题可能是
由守护程序的错误配置引起的。例如,使用了
无法识别的 jvm 选项。请参阅https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html
上有关守护程序的用户指南章节,请 阅读以下流程输出以了解更多信息: --------- -------------- VM 初始化期间发生错误无法为 1572864KB 对象堆保留足够的空间
回答by Mehul Kabaria
Try deleting your .gradlefrom C:\Users\<username>
directory and try again.
尝试从目录中删除您的.gradle 并重C:\Users\<username>
试。
回答by Mohit
Im using Android studio version 2.2.2 on win 10 (32 bit) and this is how i fix this issue:
我在 win 10(32 位)上使用 Android Studio 2.2.2 版,这就是我解决此问题的方法:
- Open your newly created project.
- Now open gradle.properties and change the JVM argument. i.e org.gradle.jvmargs=-Xmx1024m Basically it comes with default value of -Xm1536m which somehow is not working (at least for me).
- Then Rebuild the project and it should work.
- 打开您新创建的项目。
- 现在打开 gradle.properties 并更改 JVM 参数。即 org.gradle.jvmargs=-Xmx1024m 基本上它带有默认值 -Xm1536m 不知何故不起作用(至少对我而言)。
- 然后重建项目,它应该可以工作。
回答by Manoj Behera
add this line instead of following line in gradle.properties file
在 gradle.properties 文件中添加这一行而不是以下行
comment this line #org.gradle.jvmargs=-Xmx1536m
评论这一行 #org.gradle.jvmargs=-Xmx1536m
add this line
添加这一行
org.gradle.jvmargs=-Xmx512m -XX:MaxPermSize=512m
回答by spaceman
In your project file\platforms\android\cordova\lib\builders\GradleBuilder.js Search for args.push and search for the line with the below description. Mine was Xmx2048m. I changed to Xmx1024m and it worked. 16MB of RAM in my pc. Change
在您的项目 file\platforms\android\cordova\lib\builders\GradleBuilder.js 中搜索 args.push 并搜索具有以下描述的行。我的是 Xmx2048m。我改为 Xmx1024m 并且它起作用了。我的电脑中有 16MB 的 RAM。改变
args.push('-Dorg.gradle.jvmargs=-Xmx1024m');