Fix Error “Installed Build Tools revision 31.0.0 is corrupted”

Fix error “Installed Build Tools revision 31.0.0 is corrupted”

Hi folks, on the off chance that you are an android application designer and as of late refreshed your SDK, this post is intended for you. These days, one blunder is ruling the mistake universe of android development. If you have recently updated your build tools from 30.0.3 to 31.0.0, then you might have encountered the “Installed Build Tools revision 31.0.0 is corrupted” error. In this post, we are going to discuss some of the possible solutions for the error. But first, let’s have a look at what Build Tools is?

Installed Build Tools revision 31.0.0 is corrupted
Fix ERROR “Installed Build Tools revision 31.0.0 is corrupted”

What Build Tools Revision 31.0.0 does? 

As being a part of android SDK, how about we see what android SDK is, in short, to get a clear idea of what Build tool is or can be. So, Android SDK is a collection of libraries and tools essential for Developing Android Applications. Out of many tools android SDK has in its repositories, Build tools is one of them. Build Tool is a part of SDK that is essential for building the application out of the source code.

When we develop any software application, a lot of stuff is happening in the background. Build tools help assist these background tasks like linking, compiling, and downloading dependencies, to name a few. In a situation where multiple projects are there and are inter-connected, chances of code break increases because of shared projects among developers. What build tools do is, it helps prevent code from breaking due to changes made by you or other developers. Some famous build tools are Apache Ant, CruiseControl, Docker, Gradle, Maven. Now that we know a basic understanding of build tools, let’s discuss what the actual error is and its possible causes.

Don’t miss:

What is the “Installed Build Tools revision 31.0.0 is corrupted” error? 

Some errors may come in a tricky form, and some may be solved on the go with ease. You can say this one is tricky. Why? As the error itself tells you that it is corrupted, the general logic would be to uninstalling it from the system and then reinstalling it. We as a whole do this when any app crashes, or the system is not responding. This is a very basic solution we all apply for our electronic gadgets in our day-to-day life.

But that’s not it, because the problem is Build tools 31.0.0 itself. Every time any new update or releases occur in any software, they are not completely stable. Loopholes are always there. So the flaw is in the design and development of this version by Google. No other third party or the user himself is responsible. Google will likely take the matter into its own hands soon and fix the error in the new release. However, we can still sort our way out of this error and continue our development work with ease and simplicity. So, here are the different possible solutions for the given error.

How to fix error “Installed Build Tools revision 31.0.0 is corrupted” in Android Studio

There are different ways to fix this issue, go through one by one:

Solution 1:  Downgrade the build tools

The first way to handle this error is to downgrade the build tools, i.e., the version from 31.0.0 to 30.0.0. 

Doing so, you have to make the changes at three places along the way, namely:

  • compileSdkVersion
  • buildToolsVersion targetSdkVersion

Here is a step by step procedure for this particular solution: 

  1. Step 1: Go to the project structure (ctrl+alt+shift+S). After this, a new window will appear, and in the new window, you’ll see modules. 
  2. Step 2: After clicking on modules, you’ll see Build Tools Version under the Properties tab. Click on that, and a dropdown menu will appear from that select the version 30.0.3.
  3. Step 3: Besides the properties tab, there’ll be a Default Config tab. Click on that, and you’ll see Target SDK Version. Change that to 30, and you’re good to go.

The limitation of this method is you don’t get to work with build tools of 31.0.0; basically, you’re working with build Gradle version 30.0.0. But this won’t change much of your experience working with android SDK—so no need to worry. 

Solution 2: Missing dx.bat and dx.jar files

           The main reason that is causing this Installed Build Tools revision 31.0.0 is a corrupted error missing dx.bat and dx.jar files. In the location where you’ve installed the Android SDK, these files are named d8.bat and d8.jar. Location may look something like this if you didn’t specify the folder during installation and let the system do its work automatically:

“C:\Users\user\AppData\Local\Android\Sdk\build-tools\31.0.0”

So renaming d8.bat to dx.bat and d8.jar to dx.jar will solve the problem.

This solution will let you use the functionality of the build tools 31.0.0.

Note: AppData is a hidden folder in windows, so you might want to unhide folders before navigating.

Solution 3: Copy dx.jar and dx.bat files directly

 In the previous solution, if you don’t find the d8.bat and d8.jar files in the specified folder, don’t worry. We got your back here too. You can simply copy dx.jar and dx.bat files directly from an older version of build tools. Then you can paste them into the build-tools\31.0.0 folder. There is no need to rename files here because they are already there bydx.jar and dx.bat name in an older version of build tools. They will work all the same.

Conclusion:

           As an android developer and a programmer in general, you can encounter various errors when the new version or a patch of software is released. General user also encounters such type of problem during or after updation of any application or game. One of them and currently trending errors is “Installed Build Tools revision 31.0.0 is corrupted”. But no need to worry now as we have provided you multiple possible solutions. We have tried our best to provide you variety of ways to fix the error so that they can cover every aspect of the problem. And doing so, we expanded the scope of fixing the problem. Thank you, and visit this place for future updates. Happy Coding!