4

I'm on Android Studio 4.1.1. I created a new project and haven't added anything to the starter code and whenever I click build or run, I get this error:

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

I am using android studio for the first time and wanted to print a simple hello world program , and this is becoming pain in the ass.

Ajay Raut
  • 69
  • 1
  • 6
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Jan 09 '22 at 21:10
  • Still the same issue as on revision 31.0.0 here https://stackoverflow.com/questions/68387270/android-studio-error-installed-build-tools-revision-31-0-0-is-corrupted – Ma3x Feb 09 '22 at 14:24

1 Answers1

12

Please try the following instructions (assuming you are working on MS Windows):

  1. Firstly, locate your SDK folder, e.g. %ANDROID_SDK_ROOT%.
  2. Copy (NOT Rename) %ANDROID_SDK_ROOT%\build-tools\32.0.0\d8.bat to %ANDROID_SDK_ROOT%\build-tools\32.0.0\dx.bat
  3. Copy (NOT Rename) %ANDROID_SDK_ROOT%\build-tools\32.0.0\lib\d8.jar to %ANDROID_SDK_ROOT%\build-tools\32.0.0\lib\dx.jar
  4. Verify if build issue has been fixed.
Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77
Zheng
  • 121
  • 4
  • 2
    wow - worked for me, just how did you find that out?!??!? – Martin Frank Jan 21 '22 at 06:47
  • 1
    This works on MacOS as well, for those who need it see https://stackoverflow.com/questions/68387270/android-studio-error-installed-build-tools-revision-31-0-0-is-corrupted. An alternative to copying is creating a symlink instead. @MartinFrank My guess would be they have found out at the link above for version 31 :) – Ma3x Feb 09 '22 at 14:21
  • This works on Linux as well, except the `.bat` file doesn't have any extension. – fiatjaf Jul 22 '22 at 00:03
  • On MacOS right click d8 file, duplicate d8 and rename duplicate as dx. Then duplicate d8.jar and rename duplicate as dx.jar. The old SDKs had this extra file and the old Android apps will still look for this file at build time but not find it in the newest SDK version you have installed. – Walker Firmin Aug 16 '22 at 20:09