Getting the below error at the time of running java program in android studio.
Error:Execution failed for task \':app:preDebugAndroidTestBuild\'.
<Add this to your app gradle file
configurations.all {
resolutionStrategy {
force 'com.android.support:support-annotations:26.1.0'
}
}
I answered before some minutes same question Reference. If you are not going to implement testing code, then remove junit from your app.
There are lot of other questions related to this.
Conflict with dependency 'com.android.support:support-annotations'. Resolved versions for app (23.3.0) and test app (23.1.1) differ
Conflict with dependency 'com.android.support:support-annotations'. Resolved versions for app (23.1.0) and test app (23.0.1) differ