# Execution failed for task ':app:bundleRelease'. Error while executing bundletool

**Code:** `Error building the app bundle` · **Category:** Android · **Seen on:** Android

Building the Android App Bundle (.aab) failed in the bundle step.

## Meaning

bundleRelease runs bundletool after R8/resource linking. Look for the root cause lower in the stack: duplicate files, an invalid ABI split, or a corrupt resource.

## Common causes

- Duplicate or invalid native libs
- Corrupt resource or asset
- Invalid splits configuration

## Quick fix

1. Run with --stacktrace and read the root cause
2. Check packaging { jniLibs } rules
3. Clean and rebuild

## Detailed fix by platform

### Shell

1. `./gradlew :app:bundleRelease --stacktrace --info`

## How to diagnose

1. **Root cause** — first Caused by?
2. **ABI** — splits configured?
3. **Clean** — done?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/android/aab-bundletool-error)
