# Android resource linking failed

> Getting the error “Android resource linking failed”? Here is how to fix it. An icon, splash, or XML resource is invalid. The first “error:” line names the file.

**Android resource linking failed.** An Android resource — usually an icon, a splash image or an XML file — is invalid: a bad file name, broken XML, or a reference to something that doesn’t exist.

- Android build. Android resources failed to compile.
- Interactive page: https://capwr.app/free-tools/build-error-explainer/android-resource-linking-failed
- Build error explainer: https://capwr.app/free-tools/build-error-explainer
- Last updated: 2026-10-03

## What this error means

An Android resource — usually an icon, a splash image or an XML file — is invalid: a bad file name, broken XML, or a reference to something that doesn’t exist.

## Why it happens

AAPT2 failed while compiling resources. A bad icon, splash, or XML file, or an illegal resource name, is the usual cause. The first “error:” line names the file.

## The message tools print

```
Execution failed for task ':app:processReleaseResources'.
   > Android resource linking failed
```

## How to fix it

1. Find the first line starting with “error:” after this one — it names the file.
2. Resource file names may only use lowercase letters, digits and underscores.
3. Regenerate icons and splash screens if they were edited by hand.

## Check a log that shows this

Paste the failing step into the [build error explainer](https://capwr.app/free-tools/build-error-explainer). It matches this message, and any others in the same log, in your browser. Nothing is uploaded.

## Other Android build errors

- [Android SDK location not found](https://capwr.app/free-tools/build-error-explainer/android-sdk-location-not-found)
- [Android Gradle plugin requires Java 17 to run](https://capwr.app/free-tools/build-error-explainer/android-gradle-plugin-requires-java)
- [:capacitor-android project could not be found](https://capwr.app/free-tools/build-error-explainer/capacitor-android-project-could-not-be-found)
- [Keystore was tampered with, or password was incorrect](https://capwr.app/free-tools/build-error-explainer/keystore-was-tampered-with-or-password-incorrect)
- [Duplicate class found in modules](https://capwr.app/free-tools/build-error-explainer/duplicate-class-found-in-modules)
- [Could not resolve all files for configuration](https://capwr.app/free-tools/build-error-explainer/could-not-resolve-gradle-configuration)

## Let the Android build run in CI

CapWrapp builds the release on GitHub Actions with the JDK and Android SDK the project needs, and signs it with the upload keystore it stores for you.

[Get started free](https://capwr.app/login).

## About CapWrapp

CapWrapp turns a web app on GitHub — built with Lovable, Bolt, Base44, Cursor or by hand — into iPhone and Android apps. It adds Capacitor if the repo needs it, signs the builds, and ships them to TestFlight and Google Play from GitHub Actions, with no Mac or Xcode on your side. [Get started free](https://capwr.app/login) · [Lovable to App Store guide](https://capwr.app/guides/lovable-to-app-store)
