skip to Main Content

Problem:

React Native CLI App runs with,
buildToolsVersion = "31.0.0"

But While Changing it to,
buildToolsVersion = "33.0.1"

It shows the error:- Android Studio error "Installed Build Tools revision 33.0.1 is corrupted"
and some time ./gradlew clean and npx react-native run-android Failed.

Anyone with the Solution is very much Appreciated!

I’ve Tried:-

 1) rm -rf node_modules package-lock.json 

    npm i --force

It doesn’t work.

 2) cd android && ./gradlew assembleDebug && ./gradlew installDebug

While running this command it’s failed in-between.

2

Answers


  1. Chosen as BEST ANSWER

    Solution:

    For Linux/Mac OS:

    Go to Terminal:

    ~ cd home
    
    ~ cd yourDirectory   //eg:ashif
    
    ~ cd Android
    
    ~ cd cd build-tools
    
    ~ cd 33.0.1         //your desired build-tools version
    
    ~ cp d8 dx          //copy d8 and create directory dx
    
    ~ cd lib
    
    ~ cp d8.jar dx.jar  //copy d8.jar and create directory dx.jar
    
    ~ ls                //to list and check the changes
    

    That's it! It Works 😊.


  2. Solution:-

    Another way is,

    ~ Go to Home Directory/Folder    //where the Android dir is present
    
    ~ Inside click Sdk dir
    
    ~ Inside click build-tools dir
    
    ~ Inside click desired directory 33.0.1   //your desired build-tools version
    
    ~ Inside that, copy the d8 folder paste it in the same location, and rename it as dx
    
    ~ Inside And click lib dir
    
    ~ Inside copy d8.jar and paste it in the same location and rename it as dx.jar
    

    That’s it! It Works 😊.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search