I'm using a modified Docker image from jangrewe to automate the build. The SDK path should already defined in the Docker image using ENV ANDROID_HOME "/sdk"
but GitLab showed me this error: java.lang.RuntimeException: SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
So I modified my .gitlab-ci.yml file like this:
image: tbremer19/wercker-container-android
before_script:
- export ANDROID_HOME="/sdk"
build:
script:
- chmod 777 *
- sudo ./gradlew assembleBetaDebug --stacktrace
artifacts:
paths:
- app/build/outputs/apk/app-beta-debug.apk
but still get this error. Did anyone of you experience this? I tried to set ANDROID_HOME as an environment variable twice but apparently that didn't help...
Use environment variable ANDROID_SDK_ROOT="/sdk". ANDROID_HOME environment variable is deprecated in newer version of android sdk.
For Reference: Android SDK environment variables
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