Resolved versions for app (24.2.1) and test app (24.0.0) differ.

Original Gradle file:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])

    // Testing dependencies
    compile 'com.google.android.gms:play-services-gcm:9.4.0'
    compile 'com.android.support:appcompat-v7:24.0.0'
    compile 'com.android.support.constraint:constraint-layout:+'
    compile 'com.android.support:design:24.2.1'
    androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
    androidTestCompile 'com.android.support.test:runner:0.5'
    androidTestCompile 'com.android.support:support-annotations:24.0.0'
}
androidTestCompile 不匹配

FIXED when I added:

androidTestCompile 'com.android.support:support-annotations:24.2.1'

相关推荐