. Advertisement .
..3..
. Advertisement .
..4..
While executing a project on Android Studio, we faced the ”Installed Build Tools revision 31.0.0 being corrupted. Remove and install again using the SDK Manager” error. In the following article, let’s explain all the possible answers for this error!
What Is Installed Build Tools revision 31.0.0 being corrupted. Remove and install again using the SDK Manager Error?
If you have recently started a new Android Studio project, you will face the following error.
Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.
How To Solve ”Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager” Error
Solution 1: Open the Project code tab and navigate to Gradle Scripts
Open the Project code tab and navigate to Gradle Scripts –> build.gradle. Let’s follow these steps below:
- Change the values of three variables: compileSdkVersion, buildToolsVersion, and targetSdkVersion from 31 to 30.
- When you see a lightbulb appear on edited lines, click and select synchronize [to version 30]. It will download BuildTool Version 30 and automatically change the project parameters by Android Studio.
Solution 2: Try adjusting these parameters
Let’s try adjusting these parameters, and it seems to work effectively. You will obtain SDK V30 from the SDK manager, and your setup is identical to what is shown below.
- compileSdkVersion 30
- buildToolsVersion “30.0.3”
- minSdkVersion 23
- targetSdkVersion 30
Solution 3: Apply this alternative as below
You may apply this alternative as below.
- DX is missing from build-tool 31.0.0 at path-to-sdk build-tools 31.0.0dx.bat.
- You may try replicating it from early versions.
- The same happened on 31.0.0-rc5.
Solution 4: Follow these steps
Another solution you may apply for the error ”Installed Build Tools revision 31.0.0 being corrupted. Remove and install again using the SDK Manager” is to follow these steps.
- Press Ctrl+Alt+Shift+S combination to open the project structure. Then, on the left, click Module.
- Open the Properties toolbar, change Compile SDK Version to 30, and then change the build tools to 30.0.2.
- After that, go to the Default Config menu and make the Target SDK Version to 30.
Solution 5: Change the build.gradle file for app to the accurate versions of build tool
Excepting the methods mentioned above, changingthe build.gradle file for app to the accurate versions of build is also a great solution forr you to solve the ”Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager” error. This method relates to upgrade the versions of the build tools by utilizing the build.gradle file for app.
First, you need to open the app’s build.gradle file. Then, let’s click Sync after updating targetSdkVersion and compileSdkVersion to 30. Look at the following example to understand more about these steps:
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
}
This is an efficient way for you to solve your problem. After you do it, your error will disappear and your program will work well without any errors. Therefore, let’s do it to get your desired results.
Conclusion
The ”Installed Build Tools revision 31.0.0 being corrupted. Remove and install again using the SDK Manager” error can be challenging for fresh developers as it can be hard to fix. Check our article again and apply our solutions. You may also use your own, more suitable solution to solve it and send us your answers to better support you in the future. Thank you!
Read more
Leave a comment