Resolved versions for app (26.1.0) and test app (27.1.1) differ
configurations.all{
resolutionStrategy {
force 'com.android.support:support-annotations:26.1.0'
}
}
Recently I was getting this error again....I just go to build->rebuild project and it works everytime for me.
Change all the implementation in your build gradle app For Example.
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-annotations:27.1.1'
Change It all to latest version(27.1.1) and sync the project.