Installed Build Tools is corrupted, android sdk error, android build tools, android studio build error

Installed Build Tools is corrupted Android Studio Error [Solved]

Recently while working with the android studio for a specific project I came across some errors while building my app so that I can generate an apk to install on my mobile device

The error might vary from one project or android studio version to another due to the fact that the tools used could be different.

The error which we shall solve today in this discussion is as follows

Installed Build Tools revision 32.0.0 is corrupted. Remove and install again using the SDK Manager.

Depending on the SDK compile version that one is using for their project, the error might vary but the method of solving the error is the same. The error you might also face include the following

Installed build tools revision 31.0.0 is corrupted. Remove and install again using the SDK manager.

OR

Installed build tools revision 28.0.3 is corrupted. Remove and install again using the SDK manager.

In this article, we shall discuss the various ways which I used to ensure that the error installed build tools is corrupted is solved in android studio

Method 1 using the right SDK

Android Software Development Kit (SDK) is generally some development tools that are grouped together so as to develop android applications. Android SDK helps in building, debugging, running, and testing android applications

Note that you cannot create android applications using the android studio without having an SDK and it must be the right SDK for your project and it must not be corrupted

One of the reasons why you get the error installed build tools is corrupted depending on the version you are using is that you are using an incorrect SDK

  • How can one use an incorrect SDK

This happens when you import a project from another source and fail to get the specific SDK that has the tools that were used to develop the project you have just imported

There are projects that were built using an SDK that has configurations that are different from the ones that you have configured and set in your android studio

  • How to use the right SDK

To use the right SDK, you must import the project SDK together with the project.

  • Next, open the project structure by clicking the folder icon on the top right of the second navigation bar or using Ctrl+Alt+Shift+S

Installed Build Tools is corrupted Android Studio Error

  • Click on SDK location on the modal that pops up
  • Choose the right SDK location for the project

Installed Build Tools is corrupted Android Studio Error

  • Click apply and then okay
  • Wait for the build to finish

If the SDK specified or selected matches the one for the project, the project will build successfully and the error installed build tools is corrupted will be solved else the error will persist

Method 2 using the correct project modules

Mostly the error occurs for projects that are not created using the procedure of using new then new project from the current android studio as using this method creates a project that is compatible with the current modules that are defined by default

When the project is imported or you update the structure of the app without applying to all other projects and you open the project again, it is likely that the error will appear

To use the correct project modules, you must note the error with the correct version that is being displayed

Installed Build Tools revision 32.0.0 is corrupted. Remove and install again using the SDK Manager.

From the above error, it is clearly seen that version 32.0.0 has an issue, you can fix this by using a lower stable version which is 30

To update the build tools to version 30,

  • Open the project structure just as we have discussed above
  • Navigate to modules and in the properties, tab update the compile SDK version to 30 by selecting from the drop-down

Installed Build Tools is corrupted Android Studio Error

  • In the default config tab, update the target SDK version to 30 by selecting from the dropdown

Installed Build Tools is corrupted Android Studio Error

  • Click apply and then okay
  • Wait for the build to complete and the error will be solved successfully

Method 3 change the build.gradle file for app to correct build versions

This method works the same as the above method 2 outlined above but this involves updating the build tools version using the build.gradle file for the app

  • Open the build.gradle file for the app
  • Update the compileSdkVersion and targetSdkVersion to 30 and click sync

android {

    compileSdkVersion 30

    defaultConfig {

        applicationId "com.example.app"

        manifestPlaceholders = [onesignal_app_id               : "abcd",

                                onesignal_google_project_number: "REMOTE"]

 

        minSdkVersion 21

        targetSdkVersion 30

        versionCode 9

        versionName "9"

        multiDexEnabled true

    }

Conclusion

That’s it, using the above any 3 methods, the error installed build tools is corrupted will have been fixed

For any enquiries, reach to us through any of the channels provided and we will be glad to assist. Happy coding