1

Im trying to compile my react-native code using the command yarn android, but it shows this error on the terminal. Im using Linux Pop!_OS 21.04 and Visual Studio Code.

Unrecognized VM option 'MaxPermSize=2048m'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

I've tried some solutions but none of them have worked. Thank you in advance !

Yifan
  • 31
  • 1
  • 4

1 Answers1

1

Just by switching to java 8 this problem dissapeared

Yifan
  • 31
  • 1
  • 4
  • 1
    The java command line parameter `-MaxPermSize` is no longer supported in newer JDK versions. In fact JDK v8 was the last version to support it, hence your fix... But it could be your building pipeline was not up to date and by moving to a more recent version you could have removed this constraint... – Redoman Aug 30 '22 at 13:02