Execution failed for task ':app:mergeDebugResources'. > Duplicate resources
Two resource files define the same name and type in the same configuration (e.g. ic_logo.png and ic_logo.xml).
Duplicate resourcesResource and asset merger: Duplicate resources Meaning
Resource names ignore extensions, so a PNG and a vector with the same name collide. Copy-pasted folders, flavor overlays and library resources with identical names also trigger it.
Common causes
- Same resource name with different extensions
- Duplicate file in two source sets for the same variant
- Generated resources clashing with yours
⚡ Quick fix
- Rename or delete one of the files listed
- Check flavor/source set folders
- Prefix your resources to avoid collisions
Detailed fix by platform
Shell
find app/src -path '*/res/drawable*' -name 'ic_logo.*'
How to diagnose
- Files — Both paths listed in the error
- Source sets — main vs flavor
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- Android resource linking failed AAPT: error: resource x (aka y) not found — Android resource linking failed
- android:attr/lStar not found AAPT: error: resource android:attr/lStar not found
- Cannot fit requested classes in a single dex file Cannot fit requested classes in a single dex file (# methods: 65536 > 65536) — mergeDex failed
Most viewed in Android
- INSTALL_FAILED_USER_RESTRICTED INSTALL_FAILED_USER_RESTRICTED: Install canceled by user (Xiaomi/MIUI, Oppo, Vivo)
- INSTALL_PARSE_FAILED_NO_CERTIFICATES INSTALL_PARSE_FAILED_NO_CERTIFICATES / App not installed as package appears to be invalid
- INSTALL_FAILED_OLDER_SDK INSTALL_FAILED_OLDER_SDK / INSTALL_FAILED_DEPRECATED_SDK_VERSION
Other ways to find it
Where this error sits
Origin: On your device. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 13 Oct 2026