Two days ago, I started getting Could not create the Java Virtual Machine error. I haven't change any settings related to Android Studio OR Java. I'm not sure why this error suddenly started to show up.
The error occur when gradle (running with --info --debug options) try to execute the :app:preDexDebug task. It fails with the following message:
Error:14:16:06.756 [ERROR] [org.gradle.api.Project] AGPBI: {"kind":"SIMPLE","text":"Error: Could not create the Java Virtual Machine.","position":{},"original":"Error: Could not create the Java Virtual Machine."}
AGPBI: {"kind":"SIMPLE","text":"Error: A fatal exception has occurred. Program will exit.","position":{},"original":"Error: A fatal exception has occurred. Program will exit."}
14:16:06.760 [ERROR] [org.gradle.BuildExceptionReporter]
14:16:06.761 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
14:16:06.761 [ERROR] [org.gradle.BuildExceptionReporter]
14:16:06.761 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
14:16:06.762 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':app:preDexDebug'.
14:16:06.762 [ERROR] [org.gradle.BuildExceptionReporter] > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_45\bin\java.exe'' finished with non-zero exit value 1
14:16:06.762 [ERROR] [org.gradle.BuildExceptionReporter]
14:16:06.763 [ERROR] [org.gradle.BuildExceptionReporter] * Try:
14:16:06.763 [ERROR] [org.gradle.BuildExceptionReporter] Run with --stacktrace option to get the stack trace.
- This error occur on both versions of
Android Studio 1.3: 64bit and 32bit. - For the Xms and Xmx values on the vmoption files:
- studio.exe.vmoptions:
-Xms256m -Xmx750m - studio64.exe.vmoptions:
-Xms256m -Xmx1280m
- studio.exe.vmoptions:
- I have no environment variables related to VM options.
- I'm using Windows 7 64bit.
Aucun commentaire:
Enregistrer un commentaire