title: AndroidTestCompile dependencies not recognized in the imports
body: <p>Actually, my project has unit tests. All of them are configured in <code>/src/test/java/</code> Recently I needed to add instrumentation tests in <code>/src/androidTest/java</code>. To do that I have added espresso dependencies in <code>build.gradle</code>. </p>
  
  <pre><code>dependencies {
      compile files('libs/pixlui-1-0-5.jar')
      // You must install or update the Support Repository through the SDK manager to use this dependency.
      compile('com.fortysevendeg.swipelistview:swipelistview:1.0-SNAPSHOT@aar') {
          transitive = true
      }
      compile 'com.google.code.gson:gson:2.2.4'
      compile 'com.android.support:appcompat-v7:20.+'
      compile 'com.google.android.gms:play-services-maps:7.3.0'
      compile 'com.google.android.gms:play-services-location:7.3.0'
      compile 'com.google.android.gms:play-services-gcm:7.3.0'
  
      compile 'com.loopj.android:android-async-http:1.4.5'
      // You must install or update the Support Repository through the SDK manager to use this dependency.
      compile 'com.android.support:support-v4:20.+'
      compile 'ch.acra:acra:4.5.0'
      compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.2'
      compile 'com.squareup.picasso:picasso:2.3.4'
      provided 'com.squareup.dagger:dagger-compiler:1.2.+'
      compile 'com.squareup.dagger:dagger:1.2.+'
      compile 'com.google.guava:guava:15.0'
      compile 'com.facebook.android:facebook-android-sdk:3.23.0'
      compile 'com.mixpanel.android:mixpanel-android:4.5.3'
      compile 'com.google.maps.android:android-maps-utils:0.3+'
  
      // Testing dependencies
      testCompile 'junit:junit:4.12'
      testCompile "org.mockito:mockito-core:1.9.5"
  
      androidTestCompile 'com.android.support.test.espresso:espresso-core:2.0'
      androidTestCompile 'com.android.support.test:testing-support-lib:0.1'
      androidTestCompile ('com.android.support.test.espresso:espresso-contrib:2.0') {
          exclude module: 'support-annotations'
      }
  }
  </code></pre>
  
  <p>After that I chose on the Build Variants -> Test Artifact -> Android Instrumentation Tests. </p>
  
  <p>But when I start to code, none of the dependencies are recognized:</p>
  
  <p>"Cannot resolve symbol onView", "Cannot resolve symbol ViewInteraction", etc... </p>
  
  <p>This is my activity test:</p>
  
  <pre><code>import android.support.test.espresso.Espresso.onView;
  import android.test.ActivityInstrumentationTestCase2;
  
  import com.wiffinity.easyaccess.R;
  
  /**
   * Created by Javier on 05/06/2015.
   */
  public class EntryActivityTest extends ActivityInstrumentationTestCase2&lt;EntryActivity&gt; {
  
      public EntryActivityTest() {
          super(EntryActivity.class);
      }
  
      @Override
      protected void setUp() throws Exception
      {
          super.setUp();
          getActivity();
      }
  
      public void testLoginButtonClicked(){
          onView();
  
          ViewInteraction entryBtn;
          entryBtn = onView(withId(R.id.entry_button));
  
          entryBtn.performClick();
      }
  }
  </code></pre>
  
  <p>Why can't Android Studio 1.2 resolve these dependencies? Have I forgotten to configure something?</p>