I am using Android Espresso. I needed espresso-web to work with webviews. I set my espresso according to google website.
https://google.github.io/android-testing-sup
Try the other way around. Do not use espresso-core but just espresso-web. Example:
Espresso Official Test Kit Blog Example
Adding
packagingOptions {
exclude 'META-INF/maven/com.google.guava/guava/pom.properties'
exclude 'META-INF/maven/com.google.guava/guava/pom.xml'
}
to build.gradle file worked for me.