I build an app on Ionic framework, it works on the browser but when I try to compile it on the emulator I have got this error:
Checking Java JDK and Android SDK versions ANDROID_SDK_ROOT=undefined (recommended setting) ANDROID_HOME=C:\Users\user\AppData\Local\Android\Sdk (DEPRECATED) Starting a Gradle Daemon (subsequent builds will be faster)
FAILURE: Build failed with an exception.
- What went wrong:
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 Manual chapter on the daemon at https://docs.gradle.org/5.3.1/userguide/gradle_daemon.html
Process command line: C:\Program Files (x86)\Java\jdk1.8.0_201\bin\java.exe -Xmx2048m -Dfile.encoding=windows-1252 -Duser.country=SA -Duser.language=ar -Duser.variant -cp C:\Gradle\gradle-5.3.1\lib\gradle-launcher-5.3.1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 5.3.1
Please read the following process output to find out more:
Error occurred during initialization of VM Could not reserve enough space for 2097152KB object heap
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org C:\Gradle\gradle-5.3.1\bin\gradle: Command failed with exit code 1 [ERROR] An error occurred while running subprocess cordova.
cordova run android exited with exit code 1. Re-running this command with the --verbose flag may provide more information.