How to Fix: Error : Program type already present: android.support.design.widget.CoordinatorLayout$Behavior
Error resolving android.support.design.widget.CoordinatorLayout$Behavior dependency in Android Studio 3.2 Canary 4.
📋 Table of Contents
The error 'Program type already present: android.support.design.widget.CoordinatorLayout$Behavior' occurs when the Android Support Library's CoordinatorLayout with its built-in behavior is used in an app that has previously used it, causing a conflict.
⚠️ Common Causes
- The app has previously used CoordinatorLayout with its built-in behavior.
🚀 How to Resolve This Issue
Method 1: Clean and Rebuild Project
- Step 1: Go to Build > Clean Project (or press Shift + Alt + F10 on Windows/Linux or Command + Option + K on Mac).
Method 2: Remove Android Support Library
- Step 1: Open the build.gradle file and remove the following line: implementation 'androidx.support:design:1.0.0'
🎯 Final Words
To avoid this issue in the future, ensure that you only use a single version of the CoordinatorLayout and its behavior. If you have used it previously, clean and rebuild your project or remove the Android Support Library from your dependencies.
❓ Frequently Asked Questions
🛠️ Related Fixes
How to Fix: Pc crashes shortly after launching game (rainbow
Fix Pc crashes shortly after launching game (rainbow six siege). Compl
How to Fix: Installing an APK on a locked down phone
Installing an APK on a locked down phone: Try using a rooted device, e
How to Fix: New PC build- no signal and no clue
Fix New PC build- no signal and no clue. Complete troubleshooting guid