I have the following bitbucket-pipelines.yml file as suggested in bitbucket's documentation -
image: java:8
pipelines:
default:
- step:
script:
- bash ./gradlew build
I get the following error on running a build -
BUILD FAILED
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
I don't know where the android home dir should be or is in a bitbucket pipeline runner. They haven't mentioned an export path either.
It seems you have two problems here:
script
at runtime (not recommended, as slow), or include it in a custom-built Docker image or use another Java image wich includes the SDK.- export ANDROID_HOME=/path/to/sdk
in your script
. This might not be necessary if you find fully-prepared 3rd-party Docker image for your purposes.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With