Android X + Truth + Guava test compile issue

something alike this should prevent the duplicate:

implementation ("com.google.android.material:material:1.1.0-alpha03") {
    exclude group: "com.google.guava", module: "listenablefuture"
}

the part which updates the library seems correct:

androidTestImplementation "com.google.guava:guava:27.0.1-android"
androidTestImplementation ("com.google.truth:truth:0.42") {
    exclude group: "com.google.guava", module: "guava"
}

can only assume without a build.gradle.


To fix the conflict, merely adding a dependency on Guava 27 should be enough. Doing so should automatically (though the "Version 99 Does Not Exist" hack described in the post you linked) prevent a second copy of ListenableFuture from being pulled in. (Please let us know if not!)

Since you're working on an Android library, it sounds like you want guava-27.0.1-android rather than -jre.

I don't know anything about your side question, sorry. And sorry for the lack of a response for so long.