Ionic-archive - Erro Android - Build-tool 32.0.0 is missing DX

Description of the issue

On Jul 13 we had a SUCCESS in our build, but now, with the same branch and same workflow we had FAILED with a message “Installed Build Tools revision 32.0.0 is corrupted. Remove and install again using the SDK Manager.”

Environment:

SUCCESS
Agent version: 1.36.1
bitrise “run” version: 1.49.0

FAILED
Agent version: 1.38.0
bitrise “run” version: 1.49.3

Erro

Build-tool 32.0.0 is missing DX at /usr/local/share/android-sdk/build-tools/32.0.0/dx
FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine the dependencies of task ‘:app:compileReleaseJavaWithJavac’.
    Installed Build Tools revision 32.0.0 is corrupted. Remove and install again using the SDK Manager.

The solution was to run this before my failed step.

cd /usr/local/share/android-sdk/build-tools/32.0.0 \ && mv d8 dx \ && cd lib \ && mv d8.jar dx.jar

1 Like

I had the same issue. Above command with script step before Cordova Archive step did the trick.