問題描述:
在studio中添加了如下的代碼
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
報異常:
Warning:Conflict with dependency 'com.android.support:support-annotations'. Resolved versions for app (24.2.0) and test app (23.1.1) differ. See http://g.co/androidstudio/app-test-app-conflict for details.
解決辦法:
在頂層中使用這個檔案
configurations.all {
resolutionStrategy.force 'com.android.support:support-annotations:23.1.0'
}