Skip to main content

Posts

Showing posts with the label Dependency Conflict

How to Fix "4 issues were found when checking AAR metadata" in Android Studio

Fixing the "4 issues were found when checking AAR metadata" Error The error   Execution failed for task ':app:checkDebugAarMetadata'   is a common but frustrating build failure in Android Studio. It indicates a problem with the metadata of one or more Android Archive (AAR) libraries your project depends on. This guide will help you diagnose the root cause and provide step-by-step solutions to resolve it. Step 1: Diagnose the Problem The error message is generic. To find the specific culprit, you need more detailed logs. Open the   Terminal   in Android Studio ( View > Tool Windows > Terminal ). Run one of the following commands to get verbose output: bash ./gradlew :app:checkDebugAarMetadata --info or for even more detail: bash ./gradlew :app:checkDebugAarMetadata --debug Scan the output   for lines containing "AAR metadata" or specific library names. The log will explicitly tell you which library is causing the issue and why (e.g.,   minSdkVersion ...

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...