0

I have a fresh install of the software, and whenever I try to run the build, it fails, giving me this error message.

Troubleshooting: I've already tried to uncheck 31.0.0 version in the SDK manager, and put in older stable versions, but every time I try to run it, it starts installing 31.0.0 again.

  • I have this problem too. I tried to delete the build-tools version in the sdk directory, and then reinstall, but I get the same error. Have you been able to fix the issue yet? –  Jul 17 '21 at 07:42

4 Answers4

3

No need to downgrade. Renaming d8.jar & d8.bat to dx.jar and dx.bat respectively worked for me as answered here

DenisMicheal.k
  • 197
  • 2
  • 12
1

Work for me

File -> Project Structure -> Modules -> Change Build Tools Version from 31.0.0 to 30.0.3

Phuc VR
  • 111
  • 1
  • 3
0

There's something wrong with version 31.0.0.

Using the SDK tools section, click 'Show Package Details', uncheck 31.0.0 and check 30.0.3. Press apply.

This then uninstalls 31.0.0 and installs version 30.0.3. You should be able to apply those changes and then just change the buildToolsVersion "31.0.0" in your app gradle file to buildToolsVersion "30.0.3".

Dharman
  • 30,962
  • 25
  • 85
  • 135
-2

You have to change the

buildToolsVersion "31.0.0"

to

buildToolsVersion "the-build-tool-version"

in all of your gradle files