title: Android studio - App with library project fails to build
body: <p>I'm having massive trouble trying to get my app project to build. I have the main app module and a library project module as shown below:</p>
  
  <p><img src="https://i.stack.imgur.com/11Jtn.png" alt="Project Structure"></p>
  
  <p>This is the gradle.build for each of the modules:</p>
  
  <p>Main App:</p>
  
  <pre><code>buildscript {
      repositories {
          mavenCentral()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:0.6.+'
      }
  }
  apply plugin: 'android'
  repositories {
      mavenCentral()
  }
  android {
      compileSdkVersion 19
      buildToolsVersion '19.0.0'
  
      defaultConfig {
          minSdkVersion 14
          targetSdkVersion 19
      }
      buildTypes {
          release {
              runProguard true
              proguardFile getDefaultProguardFile('proguard-android-optimize.txt')
          }
      }
      productFlavors {
          defaultFlavor {
              proguardFile 'proguard-rules.txt'
          }
      }
  }
  dependencies {
      compile 'com.android.support:support-v13:19.0.+'
      compile 'com.google.android.gms:play-services:4.0.+'
      compile project(':libraries:datetimepicker')
  }
  </code></pre>
  
  <p>And this one is for the library Project:</p>
  
  <pre><code>buildscript {
      repositories {
          mavenCentral()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:0.6.+'
      }
  }
  apply plugin: 'android-library'
  
  repositories {
      mavenCentral()
  }
  
  android {
      compileSdkVersion 19
      buildToolsVersion "19.0.0"
  
      defaultConfig {
          minSdkVersion 14
          targetSdkVersion 19
      }
      release {
          runProguard true
          proguardFile 'proguard-rules.txt'
          proguardFile getDefaultProguardFile('proguard-android-ptimize.txt')
      }
  }
  
  dependencies {
      compile 'com.android.support:support-v4:19.0.+'
  }
  </code></pre>
  
  <p>Finally, This is the project settings.gradle file.</p>
  
  <pre><code>include ':App', ':libraries:datetimepicker'
  </code></pre>
  
  <p>I am able to successfully import packages from the library to my App code and use them, however when I try to compile I get the following:</p>
  
  <pre><code>Gradle: Execution failed for task ':App:compileDefaultFlavorDebug'.
  &gt; Compilation failed; see the compiler error output for details.
  
  E:\blah\blah\MyClass.java
  Gradle: error: cannot find symbol class DatePickerDialog
  Gradle: error: package DatePickerDialog does not exist
  Gradle: error: cannot find symbol class DatePickerDialog
  Gradle: error: cannot find symbol class DatePickerDialog
  Gradle: error: cannot find symbol variable DatePickerDialog
  Gradle: error: method does not override or implement a method from a supertype
  </code></pre>
  
  <p>I've been trying to fix this for 3 days now and have exhausted almost all of the similar question solutions I could find on here. I'm pretty confident with developing for android, not so confident with gradle and have probably done something obviously wrong.</p>
  
  <p>Some extra info:</p>
  
  <ul>
  <li>Android Studio v0.3.6</li>
  <li>Android SDK Build-tools rev 19</li>
  <li>Gradle version 1.8</li>
  </ul>
  
  <p>Any ideas on how to fix this?</p>