How to Fix “Installed Build Tools Revision 31.0.0 is Corrupted” Error in Android Studio

How to Fix "Installed Build Tools Revision 31.0.0 is Corrupted" Error in Android Studio

6 June 2024 Stephan Petzl Leave a comment Tech-Help

Encountering the “Installed Build Tools revision 31.0.0 is corrupted” error in Android Studio can be frustrating, especially for new developers. This guide provides a step-by-step solution to resolve this issue effectively.

Understanding the Issue

The error generally occurs due to missing files in the SDK build tool version 31.0.0. Specifically, the files dx.bat and dx.jar are missing but can be found under different names, namely d8.bat and d8.jar.

Solution for Windows

  1. Navigate to the build tools directory:
  2. Locate the file d8.bat and rename it to dx.bat.
  3. Go to the lib folder:
  4. Rename d8.jar to dx.jar.

Solution for macOS or Linux

Open the Terminal and run the following commands:

# change below to your Android SDK path
cd ~/Library/Android/sdk/build-tools/31.0.0 && mv d8 dx && cd lib && mv d8.jar dx.jar

This will rename the necessary files and resolve the error.

Alternative Solution: Downgrade Build Tools

If the above solutions do not work, you can downgrade your build tools to version 30.0.3:

  • Open the build.gradle file and change the following lines:
    compileSdkVersion 30
    buildToolsVersion "30.0.3"
    targetSdkVersion 30
  • Sync the project and apply the changes.


By following the steps outlined above, you should be able to resolve the “Installed Build Tools revision 31.0.0 is corrupted” error and continue with your Android development. For more detailed guides and troubleshooting tips, feel free to explore our other blog posts.

Leverage Automated Testing with Repeato

While you focus on resolving development issues, consider using Repeato for your test automation needs. Repeato is a No-code test automation tool for iOS and Android that helps create, run, and maintain automated tests for your apps quickly. Its computer vision and AI-based approach allows you to delegate test automation to non-technical colleagues, freeing up your time to focus on developing a great product.

Explore more about how Repeato can streamline your testing process by visiting our blog and documentation sections.

Like this article? there’s more where that came from!