title: To run dex in process, the Gradle daemon needs a larger heap. It currently has 910 MB
body: <p>Actually the main error is "<code>java.exe</code> finished with non-zero exit value 1". First i tell you every problem which i faced after installing studio:</p>
  
  <p>Three days ago, i just installed android studio &amp; I created new project. </p>
  
  <p>1)   First it throw the error "Plugin is too old, please update to more recent version", after searching on google i changed</p>
  
  <pre><code>classpath : com.android.tools.build:gradle:2.0.0-alpha2
  </code></pre>
  
  <p>to</p>
  
  <pre><code>classpath : com.android.tools.build:gradle:2.0.0-alpha8
  </code></pre>
  
  <p>Current Error solved.</p>
  
  <p>2) After that it was asking for <code>gradle 2.10</code>, i updated this one also &amp; set the path.
  <a href="https://i.stack.imgur.com/uBtZD.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/uBtZD.jpg" alt="enter image description here"></a>
  Current Error solved.</p>
  
  <p>3) When i ran my application i got one more error "<code>app-debug-unaligned.apk</code>, specified for property 'input file' does not exist". </p>
  
  <p>I searched on internet, i got one solution on stackoverflow. So as answer on stackoverflow i go to "Build" &amp; i selected <code>build apk</code>.</p>
  
  <p>Current error solved.</p>
  
  <p>4) But after that again i got one error </p>
  
  <p>"To run dex in process, the Gradle daemon needs a larger heap. It currently has 910 MB.
  For faster builds, increase the maximum heap size for the Gradle daemon to more than 1G.</p>
  
  <p><code>java.exe</code> finished with non-zero exit value 1". </p>
  
  <p>I have been searching on stackoverflow for last three days, i applied each and every answer one by one but i'm not able to solve the error. Please save my life, i am really tired of this problem. I show you image what error is coming exactly<a href="https://i.stack.imgur.com/Ej7By.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/Ej7By.jpg" alt="enter image description here"></a></p>
  
  <p>My <code>build.gradle</code> file</p>
  
  <pre><code>apply `plugin: com.android.application`
  
  android {
      compileSdkVersion 23
      buildToolsVersion "23.0.2"
  
      defaultConfig {
          applicationId "java.danish.org.myapplication"
          minSdkVersion 15
          targetSdkVersion 23
          versionCode 1
          versionName "1.0"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      testCompile 'junit:junit:4.12'
      compile 'com.android.support:appcompat-v7:23.1.1'
      compile 'com.android.support:design:23.1.1'
  }
  </code></pre>
  
  <p>I updated everything SDK platforms &amp; SDk Tools.<a href="https://i.stack.imgur.com/35eEF.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/35eEF.jpg" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/AcPMn.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/AcPMn.jpg" alt="enter image description here"></a></p>
  
  <p>Please tell me what i am doing wrong here.</p>