Reputation: 1353
Running tests via Android Studio, Gradle
Espresso:
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.1'
Library:
androidTestCompile 'com.android.support.test:testing-support-lib:0.1'
Runner:
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Error:A problem occurred configuring project ':application'.
> Conflict with dependency 'com.android.support:support-annotations'. Resolved versions for app and test app differ.
Upvotes: 0
Views: 718
Reputation: 19351
Get comfortable with command-line Gradle. This tool help you find any conflicting dependencies when you run from console that command gradle -q app:dependencies
.
Instead of deleting androidTestCompile 'com.android.support.test:testing-support-lib:0.1'
from your app's build.gradle
file, you can add exclude
part like here.
androidTestCompile ('com.android.support.test.espresso:espresso-contrib:2.0') {
exclude module: 'support-annotations'
}
Hope it help.
Upvotes: 0