Hi,
Pipeline for an android project is failing due to missing DX file for build tools 32.0.0. I am using minimum android sdk 32 and build tools 32.0.0 for my project. I was using docker image: androidsdk/android-30 and now updated to image: androidsdk/android-31 but the error is same. On local machine I faced this issue and replaced the d8 files with dx and the build is successful but I think this also need to be done on bitbucket side as well.
Error:
Checking the license for package Android SDK Platform 32 in /opt/android-sdk-linux/licenses
License for package Android SDK Platform 32 accepted.
Preparing "Install Android SDK Platform 32 (revision: 1)".
"Install Android SDK Platform 32 (revision: 1)" ready.
Installing Android SDK Platform 32 in /opt/android-sdk-linux/platforms/android-32
"Install Android SDK Platform 32 (revision: 1)" complete.
"Install Android SDK Platform 32 (revision: 1)" finished.
Build-tool 32.0.0 is missing DX at /opt/android-sdk-linux/build-tools/32.0.0/dx
Hi @Abid Khan and welcome to the community.
Bitbucket Pipelines builds run in Docker containers. We support public and private Docker images including those hosted on Docker Hub, AWS, GCP, Azure and self-hosted registries accessible on the internet. However, we do not own or maintain all the Docker images hosted in these registries.
If there are certain tools missing from the Docker image you use in your bitbucket-pipelines.yml file, then you can:
1. either install them during the build by adding the necessary commands in your bitbucket-pipelines.yml file
2. or use a different Docker image that has all the tools you need
3. or create a custom Docker image that has all the tools you need, and use that instead in your bitbucket-pipelines.yml file
In the following link, you can find more info on using Docker images as build environments. The last section, with the title "Creating a custom build environment", has resources on creating a custom Docker image.
Kind regards,
Theodora
Hi @Theodora Boudale really appreciate the detail answer from you which makes sense to me. Thanks for pointing the docker image which I was too thinking about. I will give it a try.
Thank you once again.
Regards,
Abid
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are very welcome Abid, please feel free to reach out if you need anything further.
I also wanted to let you know that we have the following guide for debugging Pipelines builds locally with Docker:
You may want to try this with different Docker images locally so that you don't consume your Pipelines minutes, until you get a successful build.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is a flaw in your build environment, not Bitbucket. You'll need to fix up your build environment, and that's probably not even something you would store in Bitbucket, let alone be part of BB
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.