title: Robolectric No tests found
body: <p>I started with robolectric in android studio. 
  I would run a simple example, but i have this error </p>
  
  <p>Running tests
  Test running started
  junit.framework.AssertionFailedError: No tests found in com.example.myApp.AuthenticationActivityTest
  at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191)
  at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176)
  at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:555)
  at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1837)</p>
  
  <h2>Test class</h2>
  
  <pre><code>@RunWith(RobolectricTestRunner.class)
  public class AuthenticationActivityTest {
  
  @Test
  public void checkAccountType() throws Exception{
      String accType = new AuthenticationActivity().getResources().getString(R.string.account_type);
      assertThat(accType,equalTo("com.example.myApp"));
  }
  }
  </code></pre>
  
  <h2>Gradle file</h2>
  
  <pre><code>apply plugin: 'com.android.application'
  apply plugin: 'org.robolectric' //Robolectric
  
  android {
      compileSdkVersion 21
      buildToolsVersion "21.1.2"
  
      defaultConfig {
          applicationId "com.example.myApp"
          minSdkVersion 14
          targetSdkVersion 21
          versionCode 1
          versionName "1.0"
      }
  
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
          debug {
              debuggable true
          }
      }
      packagingOptions {
          exclude 'META-INF/DEPENDENCIES'
          exclude 'META-INF/NOTICE'
          exclude 'META-INF/LICENSE'
          exclude 'META-INF/LICENSE.txt'
          exclude 'META-INF/NOTICE.txt'
          exclude 'LICENSE.txt'
      }
  }
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      compile 'com.android.support:appcompat-v7:21.0.3'
      androidTestCompile 'junit:junit:4.12' //Robolectric
      androidTestCompile 'org.robolectric:robolectric:2.4' //Robolectric
  }
  </code></pre>
  
  <h1>Update</h1>
  
  <p>when i add the testInstrumentationRunner in default config in the gradle like:</p>
  
  <pre><code>testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  </code></pre>
  
  <p>the robolectic tests become recognized, but i got this error: </p>
  
  <pre><code>com.example.myApp.AuthenticationActivityTest &gt; testAccountType[small(AVD) - 5.0.2] FAILED 
  java.lang.NullPointerException: parentLoader == null &amp;&amp; !nullAllowed
  at java.lang.ClassLoader.&lt;init&gt;(ClassLoader.java:210)
  :app:connectedAndroidTest FAILED
  </code></pre>