title: android run failed Error:Execution failed for task ':app:compileDebugJavaWithJavac'
body: <p>The Android studio build is successful, but when I click run app the following error appears:</p>
  
  <blockquote>
    <p>Error:Execution failed for task ':app:compileDebugJavaWithJavac'. 
    Compilation failed; see the compiler error output for details.</p>
  </blockquote>
  
  <p>Running <code>./gradlew complileDebug --stacktrace --info</code> in terminal, I receive the following exception:</p>
  
  <blockquote>
    <p>org.gradle.execution.TaskSelectionException: Task 'compileDebug' is
    ambiguous in root project 'gp2-android'. Candidates are:
    'compileDebugAidl', 'compileDebugAndroidTestAidl',
    'compileDebugAndroidTestJavaWithJavac', 'compileDebugAndroidTestNdk',
    'compileDebugAndroidTestRenderscript',
    'compileDebugAndroidTestShaders', 'compileDebugAndroidTestSources',
    'compileDebugJavaWithJavac', 'compileDebugNdk',
    'compileDebugRenderscript', 'compileDebugShaders',
    'compileDebugSources', 'compileDebugUnitTestJavaWithJavac',
    'compileDebugUnitTestSources'.
            at org.gradle.execution.TaskSelector.getSelection(TaskSelector.java:100)
            at org.gradle.execution.TaskSelector.getSelection(TaskSelector.java:75)</p>
  </blockquote>
  
  <p>Here is my code:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  apply plugin: 'android-apt'
  
  
  android {
  compileSdkVersion 23
  buildToolsVersion '23.0.3'
  
  defaultConfig {
      applicationId "com.guanplus.app.android"
      minSdkVersion 15
      targetSdkVersion 23
      versionCode 1
      versionName "v1.0.1.0"
      testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  }
  
  buildTypes {
  
      debug {
          debuggable true
          buildConfigField("boolean", "DEBUG_SERVER_HOST", "true")
          buildConfigField("String", "DEFAULT_IDENTITY_SERVER_HOST", "\"https://api-identity-dev.guanplus.com\"")
          buildConfigField("String", "DEFAULT_ACCOUNTING_SERVER_HOST", "\"http://api-accounting-dev.guanplus.com\"")
          buildConfigField("String", "DEFAULT_WEB_HOST", "\"https://web-gp2-dev.guanplus.com/\"")
          minifyEnabled false
      }
  
      staging{
          debuggable false
          buildConfigField("boolean", "DEBUG_SERVER_HOST", "false")
          buildConfigField("String", "STAGE_IDENTITY_SERVER_HOST", "\"http://api-identity-stage.guanplus.com\"")
          buildConfigField("String", "STAGE_ACCOUNT_SERVER_HOST", "\"http://api-accounting-stage.guanplus.com\"")
          buildConfigField("String", "STAGE_WEB_HOST", "\"https://web-gp2-stage.chinacloudsites.cn/\"")
          minifyEnabled true
          proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
      }
  
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
  }
  sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/'] } }
  
  packagingOptions {
      exclude 'META-INF/LICENSE.txt'
      exclude 'META-INF/NOTICE.txt'
      exclude '.readme'
  }
  }
  
  dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
  
  compile project(':datepicker')
  compile project(':loadinglib')
  //complie project(path: ':adapterlibrary')
  
  compile 'com.android.support:design:23.1.0'
  compile 'com.android.support:appcompat-v7:23.1.0'
  compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha2'
  
  //recycleview
  compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:v2.0.5'
  compile 'com.google.code.gson:gson:2.4'
  //rxjava*
  compile 'io.reactivex:rxjava:x.y.z'
  compile 'io.reactivex:rxandroid:1.0.1'
  //retrofit*
  compile 'com.squareup.retrofit2:retrofit:2.0.2'
  compile 'com.squareup.retrofit2:converter-gson:2.0.2'
  compile 'com.squareup.retrofit2:adapter-rxjava:2.0.2'
  //retrofit logging*
  compile 'com.squareup.okhttp3:logging-interceptor:3.2.0'
  //inject butterknife
  compile 'com.jakewharton:butterknife:8.2.1'
  apt 'com.jakewharton:butterknife-compiler:8.2.1'
  //recycleview
  compile 'com.jcodecraeer:xrecyclerview:1.2.7'
  compile 'com.yqritc:recyclerview-flexibledivider:1.4.0'
  //rxliftcycle
  compile 'com.trello:rxlifecycle:0.6.1'
  compile 'com.trello:rxlifecycle-components:0.6.1'
  //material design
  compile 'com.github.rey5137:material:1.2.4'
  compile 'com.weiwangcn.betterspinner:library-material:1.1.0'
  //MPAndroidChart
  compile 'com.github.PhilJay:MPAndroidChart:v3.0.0-beta1'
  //smartlayout
  compile 'com.ogaclejapan.smarttablayout:library:1.6.1@aar'
  compile 'com.ogaclejapan.smarttablayout:utils-v4:1.6.1@aar'
  //load pdf
  compile 'com.github.barteksc:android-pdf-viewer:2.0.1'
  //spin kit
  compile 'com.github.ybq:Android-SpinKit:1.0.5'
  //BUGhd
  compile 'im.fir:fir-sdk:latest.integration@aar'
  
  //test
  androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
      exclude group: 'com.android.support', module: 'support-annotations'
  })
  testCompile 'junit:junit:4.12'
  
  }
  </code></pre>