title: Android Studio: Failed Gradle execution. Cause: Broken Pipe
body: <p>Whenever I build/run my android project in android-studio I get a message box saying: <code>Failed to complete Gradle execution.Cause: Broken pipe</code>and then the old version of the app starts running on my device. I tried to clean the project but I get the same message. I tried the solution <a href="https://stackoverflow.com/questions/21066598/android-studio-0-4-2-gradle-project-sync-failed-error">here</a> but it doesn't help. I also tried the solution <a href="https://stackoverflow.com/questions/16626026/android-studio-and-gradle-build-error">here</a>. I get the following output of the <code>gradlew compileDebug --stacktrace --info</code> command:</p>
  
  <pre><code>Task 'compileDebug' is ambiguous in root project 'Wifi'. Candidates are: 'compileDebugAidl', 'compileDebugJava', 'compileDebugNdk', 'compileDebugRenderscript', 'compileDebugTestAidl', 'compileDebugTestJava', 'compileDebugTestNdk', 'compileDebugTestRenderscript'.
  
  * Try:                      
  Run gradlew tasks to get a list of available tasks. Run with --debug option to get more log output.
  
  * Exception is:             
  org.gradle.execution.TaskSelectionException: Task 'compileDebug' is ambiguous in root project 'Wifi'. Candidates are: 'compileDebugAidl', 'compileDebugJava', 'compileDebugNdk', 'compileDebugRenderscript', 'compileDebugTestAidl', 'compileDebugTestJava', 'compileDebugTestNdk', 'compileDebugTestRenderscript'.
          at org.gradle.execution.TaskSelector.getSelection(TaskSelector.java:69)
  </code></pre>
  
  <p>I keep getting the same error. Can anyone please help?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>My <code>build.gradle</code> is as follows:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 15
      buildToolsVersion "20.0.0"
  
      defaultConfig {
          applicationId "com.example.pervysage.wifi"
          minSdkVersion 15
          targetSdkVersion 15
          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>