Android Studio问题

Sye*_*san 9 android

出现此错误 错误:无法启动守护程序进程.此问题可能是由守护程序的错误配置引起的.例如,使用无法识别的jvm选项.请参阅http://gradle.org/docs/2.2.1/userguide/gradle_daemon.html上守护程序的用户指南章节.请阅读以下流程输出以了解更多信息:--------- --------------在VM初始化期间发生错误太小的初始堆

请建议解决方案,我已经尝试了很多解决方案,但仍然没有工作,我hava 2GB内存.hello world的程序运行正常,但是当我启动新项目时,这个错误就出现了.提前致谢 :)

Vis*_*mbi 13

我在Android工作室解决同样的问题

文件 - >设置 - >编译器(基于Gradle的Android项目)

在"VM选项"的Teaxt区域输入-Xmx512m -XX:MaxPermSize = 512m(复制粘贴可能无法正常输入)

注意:可能适用于Android Studio 1.3或更高版本的"VM Option"在上述路径下不可见,因此请在gradle.properties中添加以下行:

org.gradle.jvmargs = -Xmx512m -XX:MaxPermSize = 512m


Coo*_*ind 6

我也得到了这个:

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 http://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.
Run Code Online (Sandbox Code Playgroud)

只需在右上方栏(SDK Manager附近)"与Gradle文件同步项目"中按下一个图标即可解决问题.也可以按Build> Clean项目.

编辑

以下建议可能会有所帮助.或者只需在gradle.properties中添加以下行:

org.gradle.jvmargs=-Xmx512m -XX:MaxPermSize=512m
Run Code Online (Sandbox Code Playgroud)