skip to Main Content

I’m trying to run basic project but program shows

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

I’m using andriod studio 4.1 and here’s other image that may help you

enter image description here
enter image description here

I removed sdk manager 34.0.0 but it won’t works.

I also tried to fix it by change buildToolsVersion and targetSdkVersion but it made another error

Unsupported class file major version 61.
enter image description here

2

Answers


  1. Maybe you should confirm your project’s "sdk.dir" path first. It happened to me when I tried running my project on my WSL.

    Login or Signup to reply.
  2. The main problem is the two files missing in SDK build tool 34 that are

    dx.bat dx.jar The solution is that these files are named d8 in the file location so changing their name to dx will solve the error.

    For Windows
    Step 1: Go to the location: "C:UsersuserAppDataLocalAndroidSdkbuild-tools34.0.0"
    Rename the file name "d8.bat" to "dx.bat"

    In the lib folder: "C:UsersuserAppDataLocalAndroidSdkbuild-tools31.0.0lib"
    Rename the file name "d8.jar" to "dx.jar"

    Remember AppData is a hidden folder. Turn on hidden items to see the AppData folder.

    For macOS or Linux
    Go to the location: "~/Library/Android/sdk/build-tools/34.0.0", and rename the file "d8.jar" to "dx.jar" or

    cd ~/Library/Android/sdk/build-tools/34.0.0 
      && mv d8 dx 
      && cd lib  
      && mv d8.jar dx.jar
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search