Android build

Android resource linking failed

Android resources failed to compile

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.

Updated

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. It matches this message, and any others in the same log, in your browser. Nothing is uploaded.

Other Android build errors

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.

  • Free to start
  • No credit card
  • Sign in with Google or GitHub