Android : Warning:Conflict with dependency 'com.android.support:support-annotations'. Resolved versions for app (22.2.1) and test app (22.2.0) differ.
Espresso が 22.2.0 を必要としていてそれが conflict を招いているので gradle で ResolutionStrategy を設定して解消します。
Warning:Conflict with dependency 'com.android.support:support-annotations'. Resolved versions for app (22.2.1) and test app (22.2.0) differ.
build.gradle
configurations.all {
// Currently espresso is dependent on support-annotations:22.2.0
resolutionStrategy.force 'com.android.support:support-annotations:22.2.1'
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.google.android.gms:play-services-ads:7.5.0'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2'
androidTestCompile 'com.android.support.test.espresso:espresso-contrib:2.2'
androidTestCompile 'com.android.support.test:runner:0.3'
androidTestCompile 'com.android.support.test:rules:0.3'
}
Method call is ambiguous という Warning が表示されますが、これは IDE の問題らしいので特に気にする必要はありません