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."
> 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.
sdkmanager "build-tools;34.0.0"Reinstall a corrupted revision
If the revision exists but is reported corrupt, remove and reinstall it.
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.