I am using Android studio 2.1.2 and emulator to run my application,I get following error while build my application. Error:Failed to complete Gradle execution.
Cause:
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.10/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Invalid maximum heap size: -XX:MaxHeapSize=4096m
The specified size exceeds the maximum representable size.
Emulator memory and storage settings:
RAM : 1GB
VM Heap : 64MB
In Gradle.properties file add the following line:
org.gradle.jvmargs=-XX\:MaxHeapSize\=4096m -Xmx4096m
My system configuration:
I have 8GB RAM in my system.
My problem is could not able to build / run my application using emulator and get above error. Please help to solve this.