I am adding Espresso to my project in Android Studio. I have installed the Support Repository and in fact have already been using pieces of it. Then I added these dependenci
I had the same issue and I found that the dependencies with the androidTestCompile are visible only by default in the debug build variant.
You can change the build variant to be tested by adding this to your build.gradle:
android {
...
testBuildType "staging"
}
where "staging" is just an example, you should replace it with one of your build variant.
Remember that only one variant is tested.
More information here https://code.google.com/p/android/issues/detail?id=98326