Android "Failed to find Build Tools revision X" in CI
The Android Gradle plugin resolves a specific Build Tools revision to run aapt2, d8, and zipalign. When that revision is not installed in the runner SDK, the build fails before compilation with a request to install it.
What this error means
The build fails with "Failed to find Build Tools revision 34.0.0" or "Installed Build Tools revision X is corrupted. Remove and install again."
Android
> Failed to find Build Tools revision 34.0.0Common causes
The required Build Tools revision is not installed
The project pins buildToolsVersion (or AGP requires a default) that the runner SDK does not have.
A corrupted Build Tools install
A partially downloaded revision is present but corrupt, so the plugin treats it as missing.
How to fix it
Install the required revision
- Install the exact Build Tools revision the build needs with sdkmanager.
- Accept SDK licenses if prompted.
- Re-run the build.
Terminal
sdkmanager "build-tools;34.0.0"Reinstall a corrupted revision
If the revision exists but is reported corrupt, remove and reinstall it.
Terminal
sdkmanager --uninstall "build-tools;34.0.0"
sdkmanager "build-tools;34.0.0"How to prevent it
- Install the Build Tools revision the project pins on the runner.
- Cache the SDK so the revision is not refetched every run.
- Reinstall any revision reported corrupt rather than ignoring it.
Related guides
Android "AAPT2 aapt2 Daemon startup failed" in CIFix Android "AAPT2 aapt2 Daemon startup failed" in CI - the AAPT2 binary could not start, usually a missing r…
Android "compileSdkVersion is not specified" in CIFix Android "compileSdkVersion is not specified" in CI - the module build file does not declare a compile SDK…
Android "Android resource linking failed" in CIFix Android "Android resource linking failed" in CI - AAPT2 could not link resources because of an undefined…