title: "Class not found" when running JUnit tests from IntelliJ IDEA (Android)
body: <p>I have a problem when trying to run some Android JUnit tests inside IntelliJ Idea.</p>
  
  <p>My project is an Android Library project using Gradle. When I run my tests, IntelliJ complains with the following error:</p>
  
  <pre><code>Class not found: "com.domain.app.ClassTest"
  </code></pre>
  
  <p>But <code>ClassTest</code> is present inside the test package.</p>
  
  <p>Here's my build.gradle:</p>
  
  <pre><code>apply plugin: 'android-library'
  
  buildscript {
      repositories {
          mavenCentral()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:0.10.+'
      }
  }
  
  dependencies {
      repositories {
          mavenCentral()
          maven {
              url 'https://oss.sonatype.org/content/repositories/snapshots/'
          }
      }
  
      compile 'com.android.support:support-v4:19.1.+'
  
      compile('junit:junit:4.11') {
          exclude module: 'hamcrest-core'
      }
  }
  
  android {
      compileSdkVersion 18
      buildToolsVersion "19.0.3"
  
      defaultConfig {
          versionName "1.0"
          versionCode 1
  
          targetSdkVersion 18
      }
  
      sourceSets {
          main {
              manifest.srcFile 'AndroidManifest.xml'
              java.srcDirs = ['src/main/java']
              res.srcDirs = ['res']
          }
  
          androidTest {
              java.srcDirs = ['src/test/java']
          }
      }
  
      lintOptions {
          abortOnError false
      }
  }
  </code></pre>
  
  <p>My project structure:</p>
  
  <pre><code>src
  |_ main
     |_ java
       |_ com.domain.app
  |_ test
     |_ java
        |_ com.domain.app
  </code></pre>
  
  <p>I'm using IntelliJ IDEA 13.1.1.</p>
  
  <p>Thanks.</p>