Hi
I'm change the gradle properties file and it's work for me ;-)
Open 'gradle.properties' file in editor and change it like this:
Original:
org.gradle.jvmargs=-Xmx1536m
Change to:
org.gradle.jvmargs=-Xms512m -Xmx1024m
The 'Xms' is minimum and 'Xmx' is maximum memory of the gradle can use it.
So the value of that is depend of your system memory (RAM).
I hope this solution is work for you.