I am trying to build an Android project using the buildToolsVersion 33.0.2., but build fails with the following message:
Build-tool 33.0.2 is missing DX at /opt/android/sdk/build-tools/33.0.2/dx
FAILURE: Build failed with an exception.
*** What went wrong:**
Could not determine the dependencies of task ‘:app:compileITT_AWS_US_DebugJavaWithJavac’.
> Installed Build Tools revision 33.0.2 is corrupted. Remove and install again using the SDK Manager.
My project uses Gradle version 6.1.1 and fastlane version installed is: fastlane-2.217.0
When I first used the buildToolsVersion 33.0.2 for building in my local environment, I encountered this error and resolved it by renaming the extension of 2 Android SDK files from d8 to dx as follows:
I navigated to the C:\Users\user\AppData\Local\Android\Sdk\build-tools\33.0.2\lib
folder on my computer and renamed d8.jar to dx.jar
Then, I navigated to the: C:\Users\user\AppData\Local\Android\Sdk\build-tools\33.0.2
folder and renamed d8.bat to dx.bat
This has to be implemented on your side in order for the buildToolsVersion 33.0.2 to work.
Thank you in advance.