Error:Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (25.3.1) and test app (26.0.2) differ. See http://g.co/androidstudio/app-test-app-conflict for details.
库版本问题
androidTestCompile 'com.android.support.test:runner:0.4.1'androidTestCompile 'com.android.support.test:rules:0.4.1'androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.1'androidTestCompile 'com.android.support.test.espresso:espresso-contrib:2.2.1'复制代码
若build中是上面这样写的,就改成下面这样
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations'})复制代码