从版本1.3开始,Android Studio将不再支持特定于IDE的Gradle JVM参数设置。Gradle JVM设置需要在gradle.properties文件中设置。这个更改是为了保持构建输出的一致性,无论构建在哪里执行(IDE、命令行或CI服务器)。
如果您的项目正在使用特定于IDE的Gradle JVM参数,Android Studio将在项目同步时帮助您将这些设置复制到项目的gradle.properties文件中。
"Gradle"设置页面中的"Gradle VM选项"文本字段也已被删除。
我遇到了错误:
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.4/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.
我的 gradle.properties 文件
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.parallel=true