Im using Android studio version 2.2.2 on win 10 (32 bit) and this is how i fix this issue:
Open your newly created project.
Now open gradle.properties and change the JVM argument.
i.e org.gradle.jvmargs=-Xmx1024m
Basically it comes with default value of -Xm1536m which somehow is not working (at least for me).