I have been using android support v4 23.1.1 and recently tried to update it to 23.3.0 ( the latest one when this was asked) but I got the following error:
Just exemplifying Akshayraj's answer
Original Gradle file:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
[...]
compile 'com.android.support:support-annotations:25.3.0'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
}
Received error:
Error:Conflict with dependency 'com.android.support:support-annotations' in project ':app'.
Resolved versions for app (25.1.0) and test app (23.1.1) differ.
See http://g.co/androidstudio/app-test-app-conflict for details. "
FIXED when I added:
androidTestCompile 'com.android.support:support-annotations:25.3.0'
Final File:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
[...]
compile 'com.android.support:support-annotations:25.3.0'
androidTestCompile 'com.android.support:support-annotations:25.3.0'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
}