Build failure while building for Android


I’m using ionic build android --release command but i keep getting this error
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap

There seems to be issues with either ionic package itself or the @ionic/app-scripts package.