title: gradle build is successful but ":app:compileDebugJava FAILED" while running
body: <p>I am trying to debug my app. 
  when i click "sync project with gradle files", build is successful but when i try to run gradle console shows ":app:compileDebugJava FAILED" occurs.</p>
  
  <p>this is my success build from gradle console.</p>
  
  <pre><code>Executing tasks: [:app:generateDebugSources,:app:generateDebugAndroidTestSources]
  
  Configuration on demand is an incubating feature.
  :app:preBuild UP-TO-DATE
  :app:preDebugBuild UP-TO-DATE
  :app:checkDebugManifest
  :app:preReleaseBuild UP-TO-DATE
  :app:prepareComAndroidSupportSupportV42103Library UP-TO-DATE
  :app:prepareDebugDependencies
  :app:compileDebugAidl UP-TO-DATE
  :app:compileDebugRenderscript UP-TO-DATE
  :app:generateDebugBuildConfig UP-TO-DATE
  :app:generateDebugAssets UP-TO-DATE
  :app:mergeDebugAssets UP-TO-DATE
  :app:generateDebugResValues UP-TO-DATE
  :app:generateDebugResources UP-TO-DATE
  :app:mergeDebugResources UP-TO-DATE
  :app:processDebugManifest UP-TO-DATE
  :app:processDebugResources UP-TO-DATE
  :app:generateDebugSources UP-TO-DATE
  :app:preDebugAndroidTestBuild UP-TO-DATE
  :app:prepareDebugAndroidTestDependencies
  :app:compileDebugAndroidTestAidl UP-TO-DATE
  :app:processDebugAndroidTestManifest UP-TO-DATE
  :app:compileDebugAndroidTestRenderscript UP-TO-DATE
  :app:generateDebugAndroidTestBuildConfig UP-TO-DATE
  :app:generateDebugAndroidTestAssets UP-TO-DATE
  :app:mergeDebugAndroidTestAssets UP-TO-DATE
  :app:generateDebugAndroidTestResValues UP-TO-DATE
  :app:generateDebugAndroidTestResources UP-TO-DATE
  :app:mergeDebugAndroidTestResources UP-TO-DATE
  :app:processDebugAndroidTestResources UP-TO-DATE
  :app:generateDebugAndroidTestSources UP-TO-DATE
  
  BUILD SUCCESSFUL
  
  Total time: 2.204 secs
  </code></pre>
  
  <p>and gradle console with error is as:</p>
  
  <pre><code>Executing tasks: [:app:assembleDebug]
  
  Configuration on demand is an incubating feature.
  :app:preBuild UP-TO-DATE
  :app:preDebugBuild UP-TO-DATE
  :app:compileDebugNdk UP-TO-DATE
  :app:checkDebugManifest
  :app:preReleaseBuild UP-TO-DATE
  :app:prepareComAndroidSupportSupportV42103Library UP-TO-DATE
  :app:prepareDebugDependencies
  :app:compileDebugAidl UP-TO-DATE
  :app:compileDebugRenderscript UP-TO-DATE
  :app:generateDebugBuildConfig UP-TO-DATE
  :app:generateDebugAssets UP-TO-DATE
  :app:mergeDebugAssets UP-TO-DATE
  :app:generateDebugResValues UP-TO-DATE
  :app:generateDebugResources UP-TO-DATE
  :app:mergeDebugResources UP-TO-DATE
  :app:processDebugManifest UP-TO-DATE
  :app:processDebugResources UP-TO-DATE
  :app:generateDebugSources UP-TO-DATE
  :app:compileDebugJava FAILED
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':app:compileDebugJava'.
  &gt; java.lang.NullPointerException
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --    debug     option to get more log output.
  
  BUILD FAILED
  
  Total time: 2.161 secs
  </code></pre>
  
  <p>Gradle file:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
  compileSdkVersion 21
  buildToolsVersion "21.1.2"
  
  defaultConfig {
      minSdkVersion 14
      targetSdkVersion 21
      versionCode 1
      versionName "1.0"
  }
  lintOptions {
      disable 'InvalidPackage'
      abortOnError false
  }
  buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
      }
  }
  }
  
  dependencies {
  compile 'com.android.support:support-v4:21.+'
  compile 'io.reactivex:rxjava:1.0.+'
  compile 'io.reactivex:rxandroid:0.23.+'
  compile 'com.squareup.retrofit:retrofit:1.8.+'
  compile 'com.squareup.okio:okio:1.1.+'
  compile 'com.andrewreitz:shillelagh:0.5.0'
     provided 'com.andrewreitz:shillelagh-processor:0.5.0'
  compile 'com.squareup.okhttp:okhttp:2.1.+'
  compile 'com.squareup.okhttp:okhttp-urlconnection:2.1.+'
  compile 'de.keyboardsurfer.android.widget:crouton:1.8.5@jar'
     }
  </code></pre>