Wednesday, September 2, 2015

Espresso Tests and Contrib Dependency

I struggled a lot in getting the tests compiled as soon as i added contrib in build.gradle to test navigation drawer support.

Please use below dependency in build.gradle if you dont wish to suffer with contrib-2-2

androidTestCompile 'com.android.support.test:runner:0.3'
androidTestCompile 'com.android.support.test:rules:0.3'
androidTestCompile 'com.android.support:support-annotations:22.2.0'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2'
androidTestCompile ('com.android.support.test.espresso:espresso-contrib:2.2'){
    exclude group: 'com.android.support', module: 'appcompat'
    exclude group: 'com.android.support', module: 'support-v4'
    exclude module: 'recyclerview-v7'
}