Skip to main content

Posts

Showing posts with the label ListenableFuture

Resolving "Duplicate Class ListenableFuture" Errors in Android Studio

How to Fix the "Duplicate Class ListenableFuture" Error in Android If you're working on an Android project and see a build error about a duplicate   ListenableFuture   class, you've encountered a common dependency conflict. This guide will explain why it happens and show you how to fix it. Understanding the Error The error message looks like this: Duplicate class com.google.common.util.concurrent.ListenableFuture found in modules: guava-23.0.jar (com.google.guava:guava:23.0) and listenablefuture-1.0.jar (com.google.guava:listenablefuture:1.0)  This means two different libraries in your project are trying to provide the same class, causing a collision. guava-23.0.jar   contains the full Guava library, which includes   ListenableFuture . listenablefuture-1.0.jar   is a standalone, minimal artifact containing only the   ListenableFuture   class. The conflict arises when one of your dependencies requires the standalone JAR, but your project also inclu...