When adding WorkManager
to my app, I'm getting the following build error.
Program type already present: com.google.common.util.concurrent.ListenableFuture
I have used the pre-androidx version as mentioned on Pre-AndroidX Dependencies
def work_version = "1.0.1"
implementation "android.arch.work:work-runtime:$work_version"
I tried checking the gradle my_app:dependencies
to get the dependency tree too. I couldn't find what library is causing the collision.
How to resolve this?
I solved it by adding the guava library as a whole to the project.
def work_version = "1.0.1"
implementation "android.arch.work:work-runtime:$work_version"
implementation("com.google.guava:guava:29.0-jre")
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.