Skip to content
Advertisement

How to fix android build error – Could not create the Java Virtual Machine

Hi I am trying to build Android apk and I get the following errors when I run the shell script.

Could you suggest what I can do to resolve this please.

I have latest JAVA installed

JavaScript

Error I get is

JavaScript

Advertisement

Answer

You are using two JVM options that are no longer available in recent Java versions:

Both options were initially reported as a warning and now raise an actual error when trying to start the VM.

Unless you encounter specific issues, you should be able to rely on the current default values, so simply remove -XX:MaxPermSize=512m and -XX:+UseConcMarkSweepGC from your list of arguments (e.g. in your gradle.properties file).

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement