导入项目,出现 unable to start the daemon process的问题

将一个sdk使用demo导入到AS出现如下问题:

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/1.10/userguide/gradle_daemon.html Please read below 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.


解决办法:
找到该项目下面的 gradle.properties文件 将里面的对应的行,改为:

org.gradle.jvmargs=-Xmx1024m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
 
原文地址:https://www.cnblogs.com/android-er/p/5398015.html