1

When I try to create a new project in Android Studio, I get the following error.

enter image description here

Update:

This is how my gradle-wrapper.properties (located at <project_folder>\gradle\wrapper) looks like:

#Mon Dec 28 10:00:20 PST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists 
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
org.gradle.jvmargs=-XX\:MaxHeapSize\=1024m -Xmx1024m
user1406716
  • 9,565
  • 22
  • 96
  • 151
  • You know... I'm not a Android developer but I've always wondered what a `demon process` is... –  Jul 26 '16 at 02:57

2 Answers2

2

You need to increse the heap size and Change Build process heap size (Mbytes) to 1024 and Additional build process to VM Options to -Xmx512m.

Refer this solution

Community
  • 1
  • 1
Naveen Kumar M
  • 7,497
  • 7
  • 60
  • 74
1

Try tweaking memory options in gradle.properties file in your project.

Open the gradle.properties file and check these lines

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default notes: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
Ciril
  • 420
  • 3
  • 9
  • Tried it but no effect. Do I need to select somewhere to use the local project's gradle distribution? http://imgur.com/a/Px99E – user1406716 Jul 29 '16 at 01:04