title: Gradle Execution failed for task ':app:dexDebug' with new Android Studio Project
body: <p>I newly installed Android started a new default project.
  Everytime I try to start the app this error occurs:</p>
  
  <blockquote>
    <p>Error:Execution failed for task ':app:dexDebug'.
    com.android.ide.common.internal.LoggedErrorException: Failed to run command:
        C:\Users\iralu_000\AppData\Local\Android\android-studio\sdk\build-tools\19.1.0\dx.bat --dex --num-threads=4 --output C:\Users\iralu_000\AndroidStudioProjects\BuyItOrNot\app\build\intermediates\dex\debug C:\Users\iralu_000\AndroidStudioProjects\BuyItOrNot\app\build\intermediates\classes\debug C:\Users\iralu_000\AndroidStudioProjects\BuyItOrNot\app\build\intermediates\dependency-cache\debug
    Error Code:
        1
    Output:
        Das System kann den angegebenen Pfad nicht finden.
        Das System kann den angegebenen Pfad nicht finden.
        Das System kann den angegebenen Pfad nicht finden.
    (Englisch: The system can not find the path specified.)</p>
  </blockquote>
  
  <p><strong>build.gradle</strong></p>
  
  <pre><code>apply plugin: 'android'
  
  android {
      compileSdkVersion 19
      buildToolsVersion "19.1.0"
  
      defaultConfig {
          applicationId "iralution.buyitornot"
          minSdkVersion 19
          targetSdkVersion 19
          versionCode 1
          versionName "1.0"
      }
      buildTypes {
          release {
              runProguard false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-    rules.pro'
          }
      }
  }
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
  }
  </code></pre>
  
  <p>Installed via SDK Managers are:
  <img src="https://i.stack.imgur.com/9IkDI.jpg" alt="enter image description here"></p>
  
  <p>I tried to clean the project via cmd with gradlew clean but the error remains.</p>
  
  <p>I tried different JAVA SDKs (7 and currently 8).</p>
  
  <p>I tried to add the support library to the dependencies as suggested <a href="https://stackoverflow.com/questions/18021901/android-studio-gradle-build-fails-execution-failed-for-task-dexdebug">here</a>.</p>
  
  <p>Android Studio is in Version 0.6.1</p>
  
  <p>I have no clue what I could try now.</p>
  
  <p>Thanks in advance,</p>
  
  <p>Ira</p>
  
  <p><strong>Update:</strong></p>
  
  <p>I've manipulated the find_java.bat in the android-sdk which is called by the dx.bat. Instead of </p>
  
  <pre><code>for /f "delims=" %%a in ('"%~dps0\find_java.exe" -s') do set java_exe=%%a
  </code></pre>
  
  <p>and</p>
  
  <pre><code>for /f "delims=" %%a in ('"%~dps0\find_java.exe" -s -w') do set javaw_exe=%%a
  </code></pre>
  
  <p>I've set the java_exe and javaw_exe directly. This eradicates two of the three "could not find the path specified" errors, but one still remains and I cannot figure why.</p>
  
  <p><img src="https://i.stack.imgur.com/uGOVO.jpg" alt="enter image description here"></p>