# AAPT: error: resource x (aka y) not found — Android resource linking failed

**Code:** `Android resource linking failed` · **Category:** Android · **Seen on:** Android

A layout, manifest or style references a resource (drawable, string, style, attribute) that doesn’t exist in the module or its dependencies.

## Meaning

Typos, resources deleted/renamed, a theme from a library you removed (Theme.AppCompat without appcompat, Material styles without material), or resources only in another flavor/module.

## Common causes

- Referenced resource doesn’t exist (typo, deleted)
- Theme/style from a missing library
- Resource defined only in another flavor/source set
- Attribute requires a higher compileSdk

## Quick fix

1. Read the exact resource name and file in the error
2. Add the missing dependency (appcompat/material) or fix the name
3. Clean and rebuild after renames

## Detailed fix by platform

### Gradle

1. 

```kotlin
dependencies {
  implementation("com.google.android.material:material:1.12.0")
}
```


## How to diagnose

1. **Reference** — Which file/line?
2. **Library** — Provides that style/attr?
3. **Flavor** — Defined for this variant?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/android/aapt-resource-linking-failed)
